Try this...
Sub Rest_Data()
'Reset data for testing
Sheets(1).Range("A7:P16").Value = Sheets(3).Range("A7:P16").Value
End Sub
Sub RNG()
Dim v As Variant, r As Long, r2 As Long, c As Long
With Sheets(1)
v = .Range("A7:P" & .Cells(Rows.Count, 1).End(xlUp).Row).Value
For r = 1 To UBound(v, 1) - 1
If v(r, 1) <> "" Then
For r2 = r + 1 To UBound(v, 1)
If v(r2, 1) = v(r, 1) And v(r2, 2) = v(r, 2) Then
For c = 3 To UBound(v, 2) Step 2
If v(r2, c) <> "" And v(r, c) = "" Then
v(r, c) = v(r2, c)
v(r, c + 1) = v(r2, c + 1)
v(r2, 1) = ""
v(r2, 2) = ""
v(r2, c) = ""
v(r2, c + 1) = ""
Exit For
End If
Next c
End If
Next r2
End If
Next r
'.Unprotect "tomcat9765"
Application.ScreenUpdating = False
.Range("A7:P" & .Cells(Rows.Count, 1).End(xlUp).Row).Value = v
.Range("C7:P" & .Cells(Rows.Count, 1).End(xlUp).Row).NumberFormat = "[$-409]h:mm AM/PM;@"
With .Range("A7", .Cells(Rows.Count, 1).End(xlUp))
If Application.CountBlank(.Cells) Then .SpecialCells(xlCellTypeBlanks).EntireRow.Delete
End With
Application.ScreenUpdating = True
'.Protect "tomcat9765"
End With
End Sub
Bookmarks