Merging Duplicate Cells ..

Mar 25, 2008

how would i run a macro to merge duplicate cells in a column

For example, i have lots of data in columns A, B and C

however some of the data in columns A and B is the same. Column C data never changes. so to make it easier to read, i would like to merge these cells (which are the same) together?

-ColumnA-
Cat
Cat
Cat
Dog
Dog
Dog
Dog
Mouse
Mouse
Mouse
Mouse
Mouse

would become.... (with all the other data the same)

-ColumnA-
Cat

Dog

Mouse

I dont want to lose any of the rows, as the data in column C is always different. I just want to merge the similar ones, so its easier to read.

Its a bit like this, but i cant even come close to getting this to work:
[url]

View 9 Replies


ADVERTISEMENT

Finding Duplicate Data And Merging Cells

Nov 5, 2007

What I have is a massive table of data (15k+ entries), which consists of 4 different tables merged together. I have a lot of duplicate entries. However, most of these entries have information in one or another columns that its duplicate does not.

What I need to do is:

Identify the duplicate entries (by part number, which is one of the columns).

Merge the duplicate entries. In the merging process, I need to carry information over, taking data that is currently in 2 or more rows and merging it into one row.

Here's an example:

column1 column2 column3 column4
row1 a . . d
row2 . b
row3 . . c

needs to turn into:

column1 column2 column3 column4
row1 a b c d

If I'm not explaining this well, I will do my best to clarify. My main question is, is there any way to automate this process (even partially)

View 14 Replies View Related

Merging Duplicate Rows To One

Oct 18, 2005

I have a list that contains multiple data that I would like to merge in to one. There are varying duplicates.

Currently it looks similar to this:

Repid, Lname, Fname, States
000001, Doe John, CT
000001, Doe John, NY
000001, Doe John, GA
000050, Jones Mary, NJ
000050, Jones Mary, NY
000025, Presley Elvis, PA
000025, Presley Elvis, NY
000100, Doe Jane, NJ

I want to return the following:

Lname, Fname, Repid, States
000001, Doe, John, CT, NY, GA, NJ, CA, MA
000050, Jones, Mary, NJ, NY
000025, Presley, Elvis, PA, NY, GA, NJ
000100, Doe, Jane, NJ

View 9 Replies View Related

Macro For Merging Duplicate Entries?

Apr 3, 2013

I'm trying to get data totals for multiple entries and haven't been able to figure out how to do this using a pivot table.

For example:

A B
Ben 2
Bill 1
Jane 3
Bill 4
Dave 7
Jane 4


Would make it

Ben 2
Bill 5
Jane 7
etc.

this list is 3700 cells long.

Is there an easy macro or another way of doing this? I want to generate a list that gives all data totals but just lists each persons name once. I treid attaching the file but it wont let me! here is the link... [URL]

View 1 Replies View Related

Merging Duplicate Rows With Unique Data?

Jun 5, 2013

I have attached a before and after image of what I am looking to accomplish.

In the before image, you can see that there are 3 rows of data
- a header
- a repeating model number (in column F) with accompanying data (values in columns G - J are the items of interest)

In the after image, you can see that I took the 3 rows of data and turned it into simply two rows of data
- a header
- the repeating model number

What I did however in the after image, as can be seen, is I took certain data values that appeared on the repeating row (columns G - J), and included them as PRICE, COST, BEGIN, and END values in new columns on row 2.

Is there a way to accomplish this via some functions or maybe even a VBA script?

View 3 Replies View Related

Merging Almost Duplicate Rows In Excel File?

Aug 6, 2013

I have an excel file which has many rows that are almost duplicate but some columns would differ, I would like to merge them, I will try to explain what I mean by "merge" .

Code :
Sub Remove_Duplicate()
Dim LASTROW As Long Dim I As Long Dim J As Long Dim K As Long Dim MyVALUE As Variant

[Code]....

Since I am very new to this language and my tinkering doesn't work at all. Whether or not a row is "almost duplicate" is based on columns A to G.

View 1 Replies View Related

Merging Spreadsheets And Keeping Duplicate Rows?

Aug 15, 2014

I have a spreadsheet with only 80 rows in it and I need data from another spreadsheet with over 200 rows. One of these rows in each spreadsheet contains a matching field (Job #). I only want the 80 matching rows data from the over 200 row sheet.

Is there an easy way to combine these two. Even adding the 80 to the 200+ will be fine as I can just remove the blanks. I can't figure out a way to combine them and match them up.

View 2 Replies View Related

Merging Duplicate Rows And Keeping Original Data

Feb 18, 2014

I need to merge rows with duplicate values in column A (Patient Name being the most important one), with columns B, C, & D usually having different isolated values as well. Columns E, F, G, H, & I are date columns, but the data is always going to be the number 1, meaning a patient was seen once that day (if they were seen two times that day for different reasons, information would be in an unmerged second row [same patient name listed in two separate rows], where columns B & C would be different). Column J is an autosum of columns E through I if that makes a difference. Column K is a notes column. The data that needs to be merged is always added to the bottom of the spreadsheet in order to show that a patient was seen on any given day, with columns B through K almost always being blank. Example:

Column A---------Column B---Col C----Col D--Col E--Col F--Col G--Col H--Col I--Col J---------Col K
Patient Name-----Therapist---Shared--%P----2/3----2/4----2/5-----2/6----2/7---Total Visits--Notes

Alice Alpha--------AB----------PT-------1---------------------------------------------0-------------blah
Boris Beta---------BC----------SELF----2----------------------------------------------0------------blahblah
Carl Carlisle-------CD---------PTA------3----------------------------------------------0
Carl Carlisle-------AB---------SELF-----2----------------------------------------------0
Donny Delta-------DE---------PT--------1---------------------------------------------0
Ernie Elephant-----EF---------PTA-------2---------------------------------------------0
Alice Alpha-----------------------------------------------1
Carl Carlisle--------------------------------------1--------------1---------------1
Ernie Elephant-------------------------------------------1---------------1

This is what I'm hoping it can look like:

Column A---------Column B---Col C----Col D--Col E--Col F--Col G--Col H--Col I--Col J---------Col K
Patient Name-----Therapist---Shared--%P----2/3----2/4----2/5-----2/6----2/7---Total Visits--Notes

Alice Alpha--------AB----------PT-------1---------------1-----------------------------1-------------blah
Boris Beta---------BC----------SELF----2----------------------------------------------0------------blahblah
Carl Carlisle-------CD---------PTA------3-------1--------------1---------------1------3
Carl Carlisle-------AB---------SELF-----2----------------------------------------------0
Donny Delta-------DE---------PT--------1---------------------------------------------0
Ernie Elephant-----EF---------PTA-------2--------------1---------------1-------------2

In this example Carl Carlisle is being seen for two different things, however how would it be written so the macro would know which Carl Carlisle row to merge with? I'm thinking that before running the macro I could manually enter the information into column B so it knows which Carl Carlisle row above to merge with.

Data always starts at row 14 (row 13 is frozen pane header column), and extends to a row that is different every week depending on how many people happen to be in the list.

I found something from this link that looks very similar to what I need, but with no knowledge of coding, I have no idea how it should be tweaked: Merge Duplicate Rows Keeping Data In Same Columns

I know I'm asking a lot, but the amount of time this takes to manually go through hundreds of rows of patient names every week is incredibly time consuming, and I have too many other things to stay on top of at work for this to drag me down day in and day out.

View 5 Replies View Related

Combining Unique Data Into One Row With Columns While Merging / Deleting Duplicate Information

Jun 13, 2014

I have data in excel that has some information the same with a unique field. See below:

Last Name
First Name
ID
Date
Address
Apt #
Acct #
Code 1

[code]...

I want it to consolidate all of the like information but add on the codes in separate columns like this:

Last Name
First Name
ID
Date
Address
Apt #
Acct #
Code 1
Code 2
Code 3
Code 4

[code]...

Also, sometimes the same code is used multiple times but i want any duplicate codes to show as separate codes.

View 5 Replies View Related

Delete Duplicate Cells Or Rows With A Duplicate Cell

Nov 1, 2007

I feel as though I have spent enough time searching the previous posts to ask this question.

I have a 4 column sheet, column B has many cells with identical data. I want to delete all the rows that that have duplicate data in column B.

COLUMN A= Car Makers
COLUMN B= Models of cars
COLUMN C= color
COLUMN D= owner

I want to end up with rows that each contain unique info in COLUMN B.

View 9 Replies View Related

2003 - Merging Four Adjacent Cells With Text And/or Blank Cells

Jun 14, 2008

I am trying to merge text, in four adjacent cells in the same row (say cells A1,A2,A3 and A4), into a single cell (say cell A5).

I would like a comma or full stop and then a space between each item merged (cell A5).

The text to be merged may appear in any one of the four cells (cells A1 to A4). Those cells without text are blank.

Only where all 4 cells are blank, will I need cell 'A5' to indicate this.

The formula needs to be relative as I will need to copy the formula down the spreadsheet so that it applies to additional rows.

View 9 Replies View Related

Merging Cells ....

Jan 19, 2009

I have a column with data, the cells go data, blank cell, data, blank cell, data etc.

The row count will vary.

What I need to do is go through the non blank cells in the column and merge the them with the blank cells beneth them.

ie A2 = Apple
A3 = blank
A4 = Pear
A5 = blank

run the code to get

A2 and A3 = Apple
A4 and A5 = Pear

View 9 Replies View Related

Merging Cells ...?

May 25, 2007

I have data in two separate cells as follows:

Cell A1 = 7890
Cell A3 = 1

In Cell A4 I want to merge the figures as following figure:
789.01

What type of formula would I need to create for this to work for me?

View 9 Replies View Related

Merging Cells In Row That Have Same Values?

Nov 23, 2013

I'm trying to merge cells in a row (row 1, in the example below) that contain the same values. For example:

A A A B C C D D

into:

A B C D

I've used the following code, and it actually seems to work, but it gives me a runtime error and I can't figure out why.

VB:
Sub MergeCells()Dim r As Range, c As Range
Dim i As Long, j As Long
Set r = Range("A1", Cells("1", Columns.Count).End(xlToRight))

[Code]....

View 5 Replies View Related

Merging Data Of Two Cells Together..

Jan 14, 2009

I need assistance with a formula two merge data of two cells together. For instance I have a column 'first name' and 'last name' and I want to create a column of just 'name' and concatinate the data eg: John Smith. I have roughly 175 cells to do this for.

View 5 Replies View Related

Merging Cells Where Row Is Variable In VBA

May 27, 2012

Merging cells where the row is a variable. The code has two loops that consolidate date from two other sheets, it works fine but as you can see it puts the data into columns A,B and C,D respectively. My goal is to combine both into the A,B columns, which I can do very easily. My problem is that between the loops, marked by "HERE" i want to skip a line, merge cells A and B on whatever row that maybe and set an header.

Code:
Workbooks("Discovery Errors.xls").Sheets("Totals").Range("A3:U60000").EntireRow.Delete
Workbooks("Discovery Errors.xls").Sheets("Totals").Range("A3:U60000").EntireRow.Font.Bold = False

ActiveWorkbook.Sheets("Disc_Nodes").Activate
ActiveWorkbook.Sheets("Disc_Nodes").Range("A1:U60000").Sort Key1:=Range("J1"), Order1:=xlAscending, Header:= _
xlYes, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortTextAsNumbers
LastRow = Cells(Rows.Count, 1).End(xlUp).Row

[Code] ........

View 1 Replies View Related

Merging Several Cells Of Data Into One

Jun 19, 2014

How would I combine the data in 30 cells into one cell.

They all 12 digit numbers and I need them separated by a comma.

View 2 Replies View Related

Merging Multiple Cells

Feb 8, 2007

Is it possible to write a macro whereby the data in numerous cells in a row, say A1:K1 are copied into one cell, L1 then the cells from the next row, A2:K2are copied into the same cell, L1 but on the line below in the cell. I know the above doesn't make much sense so i've attached an example.

View 5 Replies View Related

Merging And Multiplying Cells Using Criteria

Oct 12, 2012

I want to merge some cells using a criteria. To be more specific, let's speak on the file attached.

Beginning with the P5 cell I want to merge to the right groups of 4 cells for each name from the column J. Therefore the first group of merged cells will be P5:S5, the next group will be T5:W5 and so on until reaches 11 groups of 4 cells. The last group will be BD5:BG5.

I tried a script like this but it says that there is a syntax error on the "Else" instruction:

Range(Range("AB5").End(xlToRight).Offset(0, 1), Range("AB5").End(xlToRight).Offset(0, nrCat)).Select

VB:
Dim i As Long
nrCat = Range("O2").Value
For i = 1 To nrCat
If Range("AB5") = "" Then

[Code] .....

View 9 Replies View Related

Merging 114,618 Cells Into 1 Very Long Cell?

Mar 30, 2013

I have a spreadsheet of barcodes 114,618 rows long. I have a program that requires me to enter in each and every barcode in a certain format. This is the format that it requires me to place the barcodes into.

23423432, 23432342, 234324323, 234322344, 432432432, .............

so and and so forth.

Only problem is my POS system exports the barcodes in a format that looks like this:

545554545435
345435435435
354543534534
354534545453

Now I have a Macro to add a comma to the end of these barcodes. That part was a breeze, however, I have hit a brick wall when it comes to placing them into an ongoing sentence type format, that my program needs. I have found several ways to combine and merge and "justify" the content, however these typically only cover small amounts of content, and doesn't even come close to hitting anything over 100,000. I don't know if maybe I need to be using another program in tandem with Excel.

View 3 Replies View Related

Merging The Contents Of Two Cells In One Third Cell?

Sep 11, 2013

How can I let cell F5 for example contain both the texts or contents of cells A1 and B1? Is there a function that can do that purpose?

View 5 Replies View Related

Merging Cells From Multiple Rows Into One Row

Jan 29, 2014

For my work I need to delete duplicate rows with the same name but keep the information in the (original) cell.

for example I have:

Cells: C D E F
Row 1 SoccerPremier League Holland
Row 2 SoccerPremier League Germany
Row 3 SoccerPremier League Poland Poland

I want to keep row 1 and add the data from row 2 & 3 with the data in the same cells so it will be:

Cells: C D E F
Row 1 SoccerPremier League HollandGermanyPolandPoland

As cells D, E, F are empty I would say you can just merge the 3 rows by selecting them and merge.

View 3 Replies View Related

Avoid Popup When Merging Cells

Sep 10, 2009

I am programming VBA for Excel and I have a problem with automatic popup messages. I would like to answer Excel's request "Selection contains more than one value. If cells are merged, only the first entry will remain" with OK. The cells are sorted, so they contain the same value, hence I want to merge them. Of course I could work around and delete every entry except for the first before merging, but I would like to know, how to answer this popup automatically, so that the user does not get to see it.

View 7 Replies View Related

Merging Multiple Cells Containing Text

Jan 26, 2010

I need to combine or merge text from cells in 20 rows of data into a format able to be printed. This is evaluation data for a class of 20 students, where each row is one students response to the evaluation, with the last cell in the row containing their comments (text data that may be blank, or up to several sentences in length). Here's what I'm trying to do:

Combine all 20 cells into one cell that can be printed (with word-wrap turned on).
Add a blank line between each comment.
Disregard any blank cells so extra blank lines are not added.

View 14 Replies View Related

Merging Cells With Similar Data

Mar 2, 2005

I am trying to merge two cells that have the exact same content in each cell. Everytime I do this, I get a pop-up warning that Im trying to merge cells with content in them and that only the upper-left content will remain. This is exactly what I want, without that pop-up, as I have to do this for multiple columns at a time.

View 2 Replies View Related

Merging Text Cells Formula?

Jul 19, 2013

is there a formula or macro for merging identical text cells in a column?

I am looking at data relating to familes with a row for each family meber therefore the address cells for each family are identical. I would like to merge these cells for ease of reference when printing the data to be used as handouts for staff attending the households.

View 8 Replies View Related

Merging Multiple Rows Into One Row With Certain Cells?

Oct 3, 2013

I am trying to do the following:

I have about 50,000 rows of user info, something like the below -

ID
First Name
Surname
Description

1
John
Smith
Associate

2
Rob
Page
Associate

What would be the best way to go about this?

View 3 Replies View Related

Merging Cells And While Retaining The Same Format

Jan 31, 2007

I have cells that contain number that have dashes

For example

Cell M contains the number 001-1234
Cell N contains the number 1234567 (I have formatted the cell to appear with a dash at the beginning -1234567
Cell O contains the number 891 (I have formatted the cell to appear with a dash at the beginning -891)

I want to combine the three cells and have the number look like this
001-1234-1234567-891

Is there a formula that will do this

I have tried the Concatenate to combine the cells but it just combines the numbers and won't let me format the number as I want it.

View 9 Replies View Related

Merging Cells With The Same Values AUTOMATICALLY?

Jul 7, 2008

How would I go about merging cells with the same values AUTOMATICALLY?

For instance in cells A1:E1, each cell contains a value of 4 except E1 so I require A1:D1 merged.

View 9 Replies View Related

Merging Multiple Data Cells Into One Cell?

Oct 24, 2013

I have a spreadsheet where I am trying to add up codes and quantitys, after this I want the repeated info deleted. For example;

12.004RWHB 4 Row Wooden Handle Welders Brush
12.004RWHB 4 Row Wooden Handle Welders Brush
20.004RWHB 4 Row Wooden Handle Welders Brush
24.004RWHB 4 Row Wooden Handle Welders Brush
4.004RWHBSS4 Row Wooden Handle Welders Brush S/S
10.004RWHBSS4 Row Wooden Handle Welders Brush S/S
12.004RWHBSS4 Row Wooden Handle Welders Brush S/S

So what I want to do is add the numbers up so I can get one value. For example, 4RWHB I want to add them all up so that it totals 68 still shows the code and description but then only shows 68 4RWHB 4 Row Wooden Handle Welders Brush and not the same line repeated. I want to condense all the information down so where there is same model numbers I can add it up and it doesn't give me multiples but summarises it down into one line per model number.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved