Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Delete then Concatenate | Excel Programming | |||
I know how to concatenate ,can one de-concatenate to split date? | New Users to Excel | |||
Macro to delete sheets and saves remaining file does not properly delete module | Excel Programming | |||
Macro to delete sheets and saves remaining file does not properly delete module | Excel Programming | |||
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 | Excel Programming |