Conditionally Transpose Data?

katk

Board Regular
Joined
Jul 21, 2009
Messages
62
I have a spreadsheet that has a list of products in column A, with date ranges for sales in column B. The way it is now, products with multiple ranges are listed multiple times in column A, and each sale date range is in a separate row, like this:

Item 111 | Jan-Jun
Item 111 | Sep
Item 111 | Oct-Dec
Item 121 | Jan
Item 121 | Apr-Jun

etc.

Is there a formula I can use that will transpose the date ranges from rows to columns, on the condition that the data in column A is the same as in the above row? In other words, so it would look like this:

Item 111 | Jan-Jun | Sep | Oct-Dec
Item 111
Item 111
Item 121 | Jan | Apr-Jun
Item 121

I can use a macro if that's what would work best, but I would prefer a formula if there's an option for that because macros work very slowly on our computers. Thanks so much in advance for any help!
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

Forum statistics

Threads
1,223,246
Messages
6,170,988
Members
452,373
Latest member
TimReeks

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top