Hello all,
I may have jumped to conclusion. One final piece of the query. The code provided by JLGWhiz works perfectly fine but I needed to ask my question with even more specificity. And again, thanks for the reply, JLGWhiz.
__CODE__
Sub t()
Dim sh As Worksheet, i As Long
Set sh = ActiveSheet
With sh
For i = 2 To sh.Cells(Rows.Count, 1).End(xlUp).Row Step 2
.Cells(i, 1).Resize(1, 5).Cut .Cells(i - 1, Columns.Count).End(xlToLeft).Offset(, 1)
Next
.Range("A1", .Cells(Rows.Count, 1).End(xlUp)).SpecialCells(xlCellTypeBlanks).EntireRow.Delete
End With
End Sub
___END___
But of each data set, every second row, the data in row 1 corresponds with row 2. e.g. A1 & A2 match. So when using the code provided it works perfect *except* for when the row doesn't have a matching set of information in the proceeding row. Explanation: Row 1 through 67, the rows align (data set equals up), then row 68 it doesn't have a proceeding row that matches, then row 69&70 has a data set, then 71 does not.
So my question is in a sheet of 27,018 entries, is their a code to align the data to match by field in row 1 and row 2 throughout the sheet and *also account for the fields in the rows that don't have corresponding data to match.
Best way I can visualize it:
A
A
B
C
C
D
E
E
And make it look like
AA
B
CC
D
EE
Again, not sure if I'm explaining myself correctly so here's to hoping. As always, I can provide more information.
Thanks so much!
R/
J
I may have jumped to conclusion. One final piece of the query. The code provided by JLGWhiz works perfectly fine but I needed to ask my question with even more specificity. And again, thanks for the reply, JLGWhiz.
__CODE__
Sub t()
Dim sh As Worksheet, i As Long
Set sh = ActiveSheet
With sh
For i = 2 To sh.Cells(Rows.Count, 1).End(xlUp).Row Step 2
.Cells(i, 1).Resize(1, 5).Cut .Cells(i - 1, Columns.Count).End(xlToLeft).Offset(, 1)
Next
.Range("A1", .Cells(Rows.Count, 1).End(xlUp)).SpecialCells(xlCellTypeBlanks).EntireRow.Delete
End With
End Sub
___END___
But of each data set, every second row, the data in row 1 corresponds with row 2. e.g. A1 & A2 match. So when using the code provided it works perfect *except* for when the row doesn't have a matching set of information in the proceeding row. Explanation: Row 1 through 67, the rows align (data set equals up), then row 68 it doesn't have a proceeding row that matches, then row 69&70 has a data set, then 71 does not.
So my question is in a sheet of 27,018 entries, is their a code to align the data to match by field in row 1 and row 2 throughout the sheet and *also account for the fields in the rows that don't have corresponding data to match.
Best way I can visualize it:
A
A
B
C
C
D
E
E
And make it look like
AA
B
CC
D
EE
Again, not sure if I'm explaining myself correctly so here's to hoping. As always, I can provide more information.
Thanks so much!
R/
J