This might be what you want
Option Explicit
Sub Summary()
Dim rRng As Range
Dim rCl As Range
Dim LastCl As Range
Dim Rw As Long
With Sheet1
Set rRng = .Range(.Cells(2, 1), .Cells(.Rows.Count, 1).End(xlUp))
Set LastCl = rRng.Cells(rRng.Rows.Count, 1)
Rw = 1
For Each rCl In rRng
If rCl.Value <> rCl.Offset(-1, 0).Value Then
.Cells(Rw, 4).Value = rCl.Offset(-1, 0).Value
.Cells(Rw, 5).Value = rCl.Offset(-1, 1).Value
Rw = Rw + 1
End If
Set rCl = rCl
Next rCl
If LastCl.Value <> .Cells(Rw - 1, 8).Value Then
.Cells(Rw, 4).Value = LastCl.Value
.Cells(Rw, 5).Value = LastCl.Offset(, 1).Value
End If
End With
End Sub
Bookmarks