
Originally Posted by
Paul
Hi DHazen, welcome to the forum.
You don't necessarily need programming for this task, although it may improve the processing time, and be less volatile than the solution I'm about to show you...
If your original data is on Sheet1 in cells A1:Y2000 (25 columns by 2000 rows), then on Sheet2 put the headers Clothing and Color in A1 and B1.
In A2 put the formula: =OFFSET(Sheet1!$A$2,FLOOR((ROW()-2)/24,1),0)
In B2 put the formula: =OFFSET(Sheet1!$B$2,FLOOR((ROW()-2)/24,1),MOD(ROW()-2,24))
Fill those formulas down to about row 48,000 (2000 clothing records * 24 colors per clothing). There's your new table. If you don't need the formulas any longer, you can select columns A and B on the new sheet and click Edit -> Copy, then click Edit -> PasteSpecial -> Values -> OK.
If you truly want a macro approach let us know.
Bookmarks