LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
pai pai is offline
external usenet poster
 
Posts: 13
Default Does anyone know how I can concat duplicate cells associating info?

On Tuesday, June 24, 2003 12:34:05 AM UTC+5:30, Tom Ogilvy wrote:
Sub Tester3()
Dim lastrow As Long
Dim i As Long
lastrow = Cells(Rows.Count, 1).End(xlUp).Row
i = lastrow
Do While i 1
If Cells(i, 1).Value = Cells(i - 1, 1).Value Then
Cells(i - 1, 2).Value = Cells(i - 1, 2).Value & "; " & _
Cells(i, 2).Value
Cells(i, 1).EntireRow.Delete
End If
i = i - 1
Loop

End Sub

Worked for me with the data you show.

Regards,
Tom Ogilvy

"Amie Fleming" wrote in message
...
Tom,

Thanks for the reply. Sorry I wasn't specific enough...

Here is an example of my data:

ID | Data
--------------------------
1231 web
1242 email
1267 data1
2983 data2
3049 web
3049 email
7869 email
5930 data3
5930 web
5930 data1

The above is my spreadsheet (with a TON of data). I need to search for
ID's which are duplicates (3049 and 5930 in the example), and create
just one row (so that I end up with unique ID's for each row). I need
to concat the "Data" field's data...so my results would be as follows:

ID | Data
--------------------------
1231 web
1242 email
1267 data1
2983 data2
3049 web;email
7869 email
5930 data3;web;data1

If anyone has any tips I would greatly appriciate it!

Thanks!


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


What if don't want to Delete the Duplicate Rows?


 
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
Creating Duplicate Info Hinojosa via OfficeKB.com Excel Discussion (Misc queries) 3 March 5th 10 10:21 PM
Duplicate info in a database [email protected] Excel Discussion (Misc queries) 1 April 17th 08 10:02 AM
duplicate info in cells ranvin56 Excel Worksheet Functions 2 December 12th 07 05:27 PM
Associating Tab Names to Cells Slave2Six Excel Discussion (Misc queries) 2 August 7th 06 09:31 PM
a little help with finding and associating cells rcarrollct Excel Discussion (Misc queries) 2 July 5th 05 10:36 PM


All times are GMT +1. The time now is 10:57 PM.

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

About Us

"It's about Microsoft Excel"