Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default 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!
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Merging data in multiple rows where the first cell has duplica

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!


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,886
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Merging Data in Different Rows crcurrie Excel Discussion (Misc queries) 8 May 5th 07 11:19 PM
merging information from partial duplicate rows Todd Excel Discussion (Misc queries) 3 August 25th 06 10:02 PM
Highliting Duplicate Cells across multiple rows equinekingdom Excel Worksheet Functions 4 April 14th 06 01:34 AM
Merging data from Multiple Worksheets wingale Excel Worksheet Functions 0 April 13th 06 06:28 PM
Count on multiple values with duplicate rows Carla Excel Worksheet Functions 1 November 22nd 05 09:25 PM


All times are GMT +1. The time now is 03:37 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"