A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Combining duplicate row data



 
 
Thread Tools Display Modes
  #1  
Old September 2nd, 2008, 10:25 PM posted to microsoft.public.excel.worksheet.functions
wagz
external usenet poster
 
Posts: 5
Default Combining duplicate row data

I have a sheet where the rows contain duplicate column data. I would like to
combine the duplicate rows while combining the individual column data.
Example:

Name Address City State Zip Phone
John Smith 999 Onterio MI 12345
John Smith MI
1234567890
John Smith 999 Onterio 12345
John Smith MI

There are multiple columns and multiple rows in the real content. This is
just an example but this should get the point across.

Any help with this would be greatly appriciated. Thanks!

-EW
  #2  
Old September 3rd, 2008, 12:44 AM posted to microsoft.public.excel.worksheet.functions
Joel
external usenet poster
 
Posts: 2,855
Default Combining duplicate row data

You would need to write a very simple macro to do this task, but I don't
think you will get the results your are expecting. Most cases when you have
data similar to what you are showing the duplicate data is the same column is
exactly the same. what do you do when one row has "999 Onterio " and the
next row has "999 Onterio St." and the 3rd row has "999 Onterio Street"? You
also haved problems when the name doesn't exactly match "John Smith", "John
B. Smith" John B Smith", or "Smith, John".

"wagz" wrote:

I have a sheet where the rows contain duplicate column data. I would like to
combine the duplicate rows while combining the individual column data.
Example:

Name Address City State Zip Phone
John Smith 999 Onterio MI 12345
John Smith MI
1234567890
John Smith 999 Onterio 12345
John Smith MI

There are multiple columns and multiple rows in the real content. This is
just an example but this should get the point across.

Any help with this would be greatly appriciated. Thanks!

-EW

  #3  
Old September 3rd, 2008, 02:14 PM posted to microsoft.public.excel.worksheet.functions
wagz
external usenet poster
 
Posts: 5
Default Combining duplicate row data

In this example the information could differ greatly, but in the application
the first row is always the same with no dynamics per category. In each
cateogry I would like to cobine the data where there are holes.

"Joel" wrote:

You would need to write a very simple macro to do this task, but I don't
think you will get the results your are expecting. Most cases when you have
data similar to what you are showing the duplicate data is the same column is
exactly the same. what do you do when one row has "999 Onterio " and the
next row has "999 Onterio St." and the 3rd row has "999 Onterio Street"? You
also haved problems when the name doesn't exactly match "John Smith", "John
B. Smith" John B Smith", or "Smith, John".

"wagz" wrote:

I have a sheet where the rows contain duplicate column data. I would like to
combine the duplicate rows while combining the individual column data.
Example:

Name Address City State Zip Phone
John Smith 999 Onterio MI 12345
John Smith MI
1234567890
John Smith 999 Onterio 12345
John Smith MI

There are multiple columns and multiple rows in the real content. This is
just an example but this should get the point across.

Any help with this would be greatly appriciated. Thanks!

-EW

  #4  
Old September 3rd, 2008, 02:25 PM posted to microsoft.public.excel.worksheet.functions
Joel
external usenet poster
 
Posts: 2,855
Default Combining duplicate row data

Sub CombineRows()

RowCount = 1
Do While Range("A" & RowCount) ""
If Range("A" & RowCount) = Range("A" & (RowCount + 1)) Then
For ColCount = 2 To 6
If Cells(RowCount, ColCount) = "" Then
Cells(RowCount, ColCount) = Cells(RowCount + 1, ColCount)
End If
Next ColCount
Rows(RowCount + 1).Delete
Else
RowCount = RowCount + 1
End If
Loop
End Sub

"wagz" wrote:

In this example the information could differ greatly, but in the application
the first row is always the same with no dynamics per category. In each
cateogry I would like to cobine the data where there are holes.

"Joel" wrote:

You would need to write a very simple macro to do this task, but I don't
think you will get the results your are expecting. Most cases when you have
data similar to what you are showing the duplicate data is the same column is
exactly the same. what do you do when one row has "999 Onterio " and the
next row has "999 Onterio St." and the 3rd row has "999 Onterio Street"? You
also haved problems when the name doesn't exactly match "John Smith", "John
B. Smith" John B Smith", or "Smith, John".

"wagz" wrote:

I have a sheet where the rows contain duplicate column data. I would like to
combine the duplicate rows while combining the individual column data.
Example:

Name Address City State Zip Phone
John Smith 999 Onterio MI 12345
John Smith MI
1234567890
John Smith 999 Onterio 12345
John Smith MI

There are multiple columns and multiple rows in the real content. This is
just an example but this should get the point across.

Any help with this would be greatly appriciated. Thanks!

-EW

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:23 AM.


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