I Example.xlsx
Hi, I am looking for a code that will run through a spreadsheet of a couple thousand rows. This spreadsheet contains duplicate values in column A, and I am looking for a code that will cut the rows with duplicate column A values, and paste them so that they are in a single row (thus eliminating column A duplicates, but retaining the unique row data associated with them). I have been doing this manually using the code below, which will cut and paste the rows for me, but I have to define the range manually for each duplicate I find. Any help would be greatly appreciated. I've attached an example of what I currently have (sheet1) and what I am looking to have (sheet2).
Thanks
Sub onerow()
Dim i, j
j = 86
For i = 4 To 6
Range("CH" & i & ":" & "CP" & i).Select
Selection.Cut
Cells(4, j).Select
ActiveSheet.Paste
j = j + 9
Next
Range(CQ4).Select
Application.CutCopyMode = False
End Sub
Bookmarks