Well I soved it, here is the code:
Sub test()
Dim r As Long
Dim inv_cnt As Long
Dim col_num As Long
Dim sk As Long
r = [a65536].End(xlUp).Row
inv_cnt = 1
col_num = 3
sk = 1
For i = 1 To r Step 1
If Cells(sk, 1) = Cells(sk + 1, 1) Then
If inv_cnt < 8 Then
Cells(sk, (col_num + 1)) = Cells((sk + 1), 3).Value
Else
Cells(sk, 10) = Cells(sk, 10).Value & " " & Cells((sk + 1), 3).Value
End If
inv_cnt = inv_cnt + 1
col_num = col_num + 1
Rows(sk + 1).Delete
Else
inv_cnt = 1
sk = sk + 1
col_num = 3
End If
Next i
End Sub
Bookmarks