I have an Excel spreadsheet with exported sales information. I want to summarize the information onto another tab. Basically Summary Sheet column A will list a Customers name, then the items they purchased. Then the next Customer and the items they purchased, in the same column.
I was able to figure out how to extract all the customer names and how often they showed up. But I can’t figure out how to copy their names, while leaving space for their items to be listed under their name.
I have step 1 figure out, but need help with step 2
I was thinking of using a function that would let me loop through the list and use the values in column B as the row position when pasting the Customer Names.
Something like
Dim i As Long
Dim j As Long
Dim NumRows As Long
NumRows = Range(“A1”, Range(“A1”).End(xlDown)).Rows.Count
Cells(1,4).Value = Cells(1,1).Value
j=”B1″
For i=2 To NumRows
Cells([j+3],4).Value = Cells(“A[i]”,1).Value
j=j+”B[i]”+2
Next i
Peter Koebel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.