try to use this
If You have a lot of data it could take a moment
Sub aa()
Dim Lastrow As Long
Dim c As Long
Dim x As Range
Columns("G:H").Delete
Columns("D:E").Delete
Columns("B").Delete
Lastrow = Range("C" & Rows.Count).End(xlUp).Row
For c = Lastrow To 1 Step -1
If IsEmpty(Cells(c, 3)) And IsEmpty(Cells(c, 3).Offset(0, -1)) Then
Cells(c, 3).EntireRow.Delete
End If
Next
Range("c2").Delete
Call emptyrow
For Each x In Range("c3:c" & Lastrow)
If Not IsEmpty(x) Then
x.Offset(0, -1) = x.Offset(-1, -1)
x.Offset(0, -2) = x.Offset(-1, -2)
End If
Next
End Sub
Sub emptyrow()
Dim ost As Long
Dim i As Long
Dim z As Integer
ost = ActiveSheet.Cells.Find(what:="*", after:=Cells(1, 1), _
searchdirection:=xlPrevious).Row
For i = ost To 1 Step -1
On Error Resume Next
With ActiveSheet.Rows(i)
z = .Find(what:="*", _
after:=.Parent.Cells(i, 1), _
searchdirection:=xlPrevious).Column
If Err.Number <> 0 Then .Delete
End With
On Error GoTo 0
Next i
End Sub
Bookmarks