I have a spreadsheet with rows of data. Each row represents a separate product and column B contains all the colours for the product in each row. Each of the colours is separated by the pipe symbol. I need a macro to look at column B in each row and then create copies of each row depending on how many colours there are for the product.
I have attached an excel file with sample data. Sheet 1 contains 2 rows (excluding the header row). The first row contains 3 colours in Column B and the second row contains 6 colours in Column B. If you look at Sheet 2, you can see that there are now 9 rows, ie. 3 for the first SKU (in sheet 1) and 6 for the second SKU (in sheet 1) and each of the colours from column B is now separated out onto its own row.
I wondered if someone could help me out with some VBA code that would produce the results in sheet 2 from the data in sheet 1 based on the colours in column B?
Thanks in advance for any help offered.