Link to home
Start Free TrialLog in
Avatar of bdelk
bdelkFlag for United States of America

asked on

Excel Crosstab

I have an excel sheet with data in two columns...

ex.

Item Key      Bin

ACB-7203      N1
ACB-7654      R33
ACB-7654      W5
ACB-7654      F5
ACB-7715      R33
ACB-7715      W6

I would like to reformat the data in a crosstab table like this

Item Key      Bin1      Bin2      Bin3

ACB-7203      N1            
ACB-7654      R33      W5      F5
ACB-7715      R33      W6      

With the end result being a unique item key in each row, with the bin information extended to separate columns. My worksheet contains thousands of items so I need an automated soultion.

Thanks
Avatar of gtgloner
gtgloner
Flag of Canada image

Here is an example, click Alt + F11 to see the code in Sheet1:
Book1.xls
An afterthought: the second line in my VBA code:

Dim item As String

is unnecessary and you can delete it and use the code. I forgot to do this before sending.
ASKER CERTIFIED SOLUTION
Avatar of gtgloner
gtgloner
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial