I have tried using the code below to merge every other row (i.e. A2 and A3, A4 and A5, A6 and A7, etc.), however I am having an issue doing so as the following happens (i.e. A2 and A4, A5 and A7, A8 and A10, etc.). Instead of every two (2) rows being merged it seems as though three (3) are being merged instead. Any help to the following please:
Sub MacroTomerge()
Application.DisplayAlerts = False
Application.ScreenUpdating = False
For i = 2 To Range("A" & Rows.Count).End(xlUp).Row Step 3
For j = 1 To Columns("A").Column
With Range(Cells(i, j), Cells(i + 2, j))
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.MergeCells = True
End With
Next
Next
End Sub
Sub MacroTomerge()
Application.DisplayAlerts = False
Application.ScreenUpdating = False
For i = 2 To Range("A" & Rows.Count).End(xlUp).Row Step 3
For j = 1 To Columns("A").Column
With Range(Cells(i, j), Cells(i + 2, j))
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
.MergeCells = True
End With
Next
Next
End Sub