Sub bbbQQQ()
Dim i As Integer
b = 1
For b = 1 To 20
i = 2
For i = 2 To 20
If Cells(b, 2).Value <> Sheets("sheet2").Cells(i, 2).Value Then
Cells(i, 4) = i
i = i + 1
Else
Cells(b, 1).Value = Sheets("sheets").Cells(i, 1).Value
End If
Next i
Cells(b, 3) = b
b = b + 1
Next b
End Sub