Try this code.....
Copy and paste into the VBA editor and run. Let me know if you need help with this.
Private Sub merge_rows()
Dim i As Long
Dim NumRows As Long
Application.ScreenUpdating = False
NumRows = ActiveSheet.Range("A65536").End(xlUp).Row
For i = 1 To NumRows
If i >= ActiveSheet.Range("A65536").End(xlUp).Row Then Exit For
Application.StatusBar = "Row Number" & i
If Application.WorksheetFunction.CountA(Range("A" & CStr(i) & ":" & "Z" & CStr(i))) = 0 Then
ActiveSheet.Rows(i).Delete
i = i - 1
End If
If Range("A" & CStr(i)).Value = "" And Range("B" & CStr(i)).Value <> "" Then
Range("B" & CStr(i) & ":Z" & CStr(i)).Copy
Range("D" & CStr(i - 1)).PasteSpecial
ActiveSheet.Rows(i).Delete
i = i - 1
End If
Next i
Application.ScreenUpdating = True
End Sub
Bookmarks