I have a file with a client ID, Name and three columns with different services provided. I want to have only one column of services provided. There are three columns because if one person had three services it was in one column with comas separating. I did text to columns on the columnand now I have three service columns but there are a lot of blanks in the second and third columns. What I want the macro to do is look to see if thereis a client id in column D of the data and if so then go to column G where the second service column is and then insert a blank row below the second service,move the service type to the first service column and copy the client ID and name down to the blank row. I have the code that works for moving the services but the loop portion doesn’t work.
Do Until IsEmpty("D2:D") - THIS IS THE LINE I AM HAVING ISSUES WITH -THE CODING BETWEEN THE DO UNTIL AND THE LOOP WORKS
Range("G2").End(xlDown).Select
ActiveCell.Offset(1, -3).Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlToRight).Offset(0, 3)).Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
ActiveCell.Offset(-1, 3).Select
Selection.Cut
ActiveCell.Offset(1, -1).Select
ActiveSheet.Paste
ActiveCell.Offset(-1, -1& - 1).Select
Range(Selection, Selection.End(xlToRight).Offset(0, -1)).Select
Selection.Copy
ActiveCell.Offset(1, 0).Select
ActiveSheet.Paste
Loop
Do Until IsEmpty("D2:D")
Range("H2").End(xlDown).Select
ActiveCell.Offset(1, -4).Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlToRight).Offset(0, 4)).Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
ActiveCell.Offset(-1, 4).Select
Selection.Cut
ActiveCell.Offset(1, -2).Select
ActiveSheet.Paste
ActiveCell.Offset(-1, -1& - 1).Select
Range(Selection, Selection.End(xlToRight).Offset(0, -1)).Select
Selection.Copy
ActiveCell.Offset(1, 0).Select
ActiveSheet.Paste
Loop
Do Until IsEmpty("D2:D")
Range("I2").End(xlDown).Select
ActiveCell.Offset(1, -5).Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlToRight).Offset(0, 4)).Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
ActiveCell.Offset(-1, 5).Select
Selection.Cut
ActiveCell.Offset(1, -2).Select
ActiveSheet.Paste
ActiveCell.Offset(-1, -1& - 1).Select
Range(Selection, Selection.End(xlToRight).Offset(0, -1)).Select
Selection.Copy
ActiveCell.Offset(1, 0).Select
ActiveSheet.Paste
Loop
Do Until IsEmpty("D2:D")
Range("J2").End(xlDown).Select
ActiveCell.Offset(1, -6).Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlToRight).Offset(0, 4)).Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
ActiveCell.Offset(-1, 6).Select
Selection.Cut
ActiveCell.Offset(1, -2).Select
ActiveSheet.Paste
ActiveCell.Offset(-1, -1& - 1).Select
Range(Selection, Selection.End(xlToRight).Offset(0, -1)).Select
Selection.Copy
ActiveCell.Offset(1, 0).Select
ActiveSheet.Paste
Loop
[/QUOTE]