I have virtually no VBA experience except that, from what I have seen other spreadsheets do, I am convinced this must be possible. I have searched all over but cannot find any explanations to help or code I can just use. I hope someone can help.
I have a download from our website cart which does not format the data how it needs to be to then up-load into some new sales order/invoice generating software.
As an example here is a link to an image that shows how the data currently looks(the workbook is called ‘Orders.csv’ but I can convert to xlsx if needed):
http://web225.extendcp.co.uk/fiercepc.co.uk/img1.jpg
As you can see if the customer purchases more than one product (not qty of a product, a completely different product) it is listed across the row. The first product is starts at column H, the second from column O, the third from column V and so on.
I need the data to be displayed as follows:
http://web225.extendcp.co.uk/fiercepc.co.uk/img2.jpg
So each product is listed below each other and with the same customer details before it. This is so the invoicing software can check each order ID and create an invoice accordingly showing all the different products.
I have no idea how to go about this. I guess it needs to be a looping macro that checks if a row has data in a cell and then copies ranges accordingly. Also, the macro would need to be in a different workbook (maybe called macros) so it acts on this download as it will be a new workbook each time it is downloaded. I hope this makes sense.
I’m sure this will be very easy for somebody, just not me. Please help! Ideally I need the macro with explanations so I can manipulate the ranges etc as this is only an example spreadsheet, the actual sheet is much bigger and contains more data.
I managed to get an answer to my own question from elsewere, but thought I’d share the answer with everyone who might be interested as the reply was spot on and indepth.