I need to have certain data copied to another book, called Customer Sales, which every time an invoice is saved (using the already present Save and Print activeX button, vba), it adds the quantity of certain items consecutively to the customers row in the table. So 100 rows, to accommodate existing and new customers. Column A is the customers. Then from Column B:X is different items as a header. So each row is reserved for a customer, whereas each column, except A, is reserved for items.
The data from the invoice i need copied is A23:A27 (items), B23:B27 (Quantities); data in a23:a27 is rows of different items. The b23:b27 is quantities of those items, same row for item:quantity.
The customers name is in a drop down list in A7, but I want the customer to stay on the same row in the sales book, so all items are increased based on quantity bought.
the A23-B23 is item-quantity, then same for rows to A,B27. So on the sales log, it'll be Customer (A7 in invoice) matched to column A in sales, then A23 item plus B23 quantity in invoice goes to Sales column B:X depending on which item, and the quantity increases the cell in these columns.
So I have no idea how to implement this. Maybe an If/Else statement, like if customer buys 10 apples increase total of apple column by quantity bought on customers row (based on cells in the invoice).
I have very little knowledge of coding, but can do it when I know what it is I am trying to do if that makes sense...What is the best method of doing this?
Thanks in advance!