LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Concatenate and Delete

I've got a spreadsheet with most of the same information on contiguous lines.
I am trying to concatenate all values in 1 specific column and delete the
others after I've added the data to the first row.

For example:
Record Number Action Type Operator Last Name Operator First Name Operator
Mid Init NUMBER
4450 New SMITH JAMES L 12345
4450 New SMITH JAMES L 673425
4450 New SMITH JAMES L 98444D
4450 New SMITH JAMES L 98K7AAA
4706 New JONES TOM 34345Y33
4706 New JONES TOM 98763R
4738 New JONES TOM 13222
4844 New BERBAUM CECELIA 787JU8
4844 New BERBAUM CECELIA 44UY33
4844 New BERBAUM CECELIA POL987
4844 New BERBAUM CECELIA 339999
4844 New BERBAUM CECELIA 999333

I know the code below isn't written correctly, so I'm hoping someone can
tell me how to write it.
'set first row
Set CurrentRow to 2
'Only run the Do until Column B is empty
For Count=1 to (as many rows as have data in column B)
'If the fields in the current row are the same as the one below, then add the
'value from column I in the 2nd row to the value in column I of the current
row.
'Then delete the 2nd row and start over.
Do while (("B" & CurrentRow) & ("D" & CurrentRow) & ("E" & CurrentRow) & "F"
& CurrentRow)) =(("B" & CurrentRow+1) & ("D" & CurrentRow+1) & ("E" &
CurrentRow+1) & "F" & CurrentRow+1))
Set ("I" & CurrentRow) + ("I" & CurrentRow) & " " & ("I" & CurrentRow+1)
Delete CurrentRow+1
Loop
'set the current row to the next row.
CurrentRow = CurrentRow+1
Next

Thank you for your time,
Dee


 
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
Delete then Concatenate Tempy Excel Programming 2 September 1st 05 02:37 PM
I know how to concatenate ,can one de-concatenate to split date? QUICK BOOKS PROBLEM- New Users to Excel 1 July 26th 05 05:07 PM
Macro to delete sheets and saves remaining file does not properly delete module pherrero Excel Programming 0 June 21st 05 05:11 PM
Macro to delete sheets and saves remaining file does not properly delete module bhawane Excel Programming 0 June 21st 05 04:54 PM
Delete every 3rd row, then delete rows 2-7, move info f/every 2nd row up one to the end and delete the row below Annette[_4_] Excel Programming 2 September 21st 04 02:40 PM


All times are GMT +1. The time now is 09:51 AM.

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"