Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Merging data in multiple rows where the first cell has duplicate d
I need to look at rows in the worksheet and determine if there are duplicates
in column A. If there are, I need to combine the two rows and delete one of them. In most columns on the row, there are numeric entries. Here is what I want to happen: Current: Dale 2 3 4 Dale 4 2 3 Dale 3 4 2 After Macro: Dale 9 9 9 There are more than three numeric columns, so I need it to act on the whole row or be able to define a range for the loop. There is no limit on the rows where the first cell might be duplicated, although, the data will be sorted on column A. Hope someone can help! Thanks! |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Merging data in multiple rows where the first cell has duplicate d
Any reason you have to use a macro?
Using a Pivot Table would seem to be a much easier solution (one that eliminates the need for sorting as well). In article , Big Red <Big wrote: I need to look at rows in the worksheet and determine if there are duplicates in column A. If there are, I need to combine the two rows and delete one of them. In most columns on the row, there are numeric entries. Here is what I want to happen: Current: Dale 2 3 4 Dale 4 2 3 Dale 3 4 2 After Macro: Dale 9 9 9 There are more than three numeric columns, so I need it to act on the whole row or be able to define a range for the loop. There is no limit on the rows where the first cell might be duplicated, although, the data will be sorted on column A. Hope someone can help! Thanks! |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Merging data in multiple rows where the first cell has duplica
Hi
One way you could do it easily, if you can accept your data moving to another sheet, would be to consolidate the data Sheets("Sheet4").Select Range("A1").Select Selection.Consolidate Sources:="[Book2]Sheet1!R1C1:R1000C13", Function:=xlSum, _ TopRow:=False, LeftColumn:=True, CreateLinks:=False Set the Workbook and sheet names as appropriate, and make the range sufficient to cover all of your data. In this example you would end up with a list on Sheet4 consisting of a single row for each person summarised in the way you require. -- Regards Roger Govier "Big Red" wrote in message ... JE, thanks for replying! This will be one piece of a much larger macro. There is a lot of formatting and other automation that I'm doing. I would rather just have a piece of VBA code that would do the job. If you can help me, I would sure appreciate it. "JE McGimpsey" wrote: Any reason you have to use a macro? Using a Pivot Table would seem to be a much easier solution (one that eliminates the need for sorting as well). In article , Big Red <Big wrote: I need to look at rows in the worksheet and determine if there are duplicates in column A. If there are, I need to combine the two rows and delete one of them. In most columns on the row, there are numeric entries. Here is what I want to happen: Current: Dale 2 3 4 Dale 4 2 3 Dale 3 4 2 After Macro: Dale 9 9 9 There are more than three numeric columns, so I need it to act on the whole row or be able to define a range for the loop. There is no limit on the rows where the first cell might be duplicated, although, the data will be sorted on column A. Hope someone can help! Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Merging Data in Different Rows | Excel Discussion (Misc queries) | |||
merging information from partial duplicate rows | Excel Discussion (Misc queries) | |||
Highliting Duplicate Cells across multiple rows | Excel Worksheet Functions | |||
Merging data from Multiple Worksheets | Excel Worksheet Functions | |||
Count on multiple values with duplicate rows | Excel Worksheet Functions |