Greetings all,
I am looking for some direction/input on a problem of mine. Every month I have a list of customers, products and amounts. I had set up a rudimentary macro to grab the information and post it into a form to print off per entry. No problems with that. The problem is that I have been asked to group customer purchases to own form, so if a customer has 3 entries, rather than 3 sheets, I need to display the information on successive lines.
The information is sorted and displayed as Cust#, CustName, Amt, & Product.
To determine a line entry with the same customer name, this works: If Cells(r, 4) = Cells(r – 1, 4) Then addon
But then it gets stupid (or should I say my attempts at coding).
Sub addon()
i = 8
While Sheets(“Blank”).Cells(i, 3) “”
i = i + 1
Wend
End Sub
At which point it goes back to the copy/paste macro and should add successive products and amounts to the lines below it. Of course this does not work – that would be too easy.
So, when doing a copy/paste macro, how do I get it to check for multiple entries and add them on rather than process them separately?
Your suggestions please.
Thanks!