I have this data in the following format:

ID   Product A   Product B
__________________________
1    19          27
2    12          32

But what I would like to have ii in this format:

ID   Product     Quantity
_________________________
1    Product A   19
1    Product B   27
2    Product A   12
2    Product B   32

Just a hint in the right direction could be very helpful, thanks!

link|improve this question

45% accept rate
Have you looked at Pivot tables? – Mark Lewsey Nov 9 '10 at 16:07
No I had not, thanks for the tip. – michielvoo Nov 10 '10 at 12:46
feedback

1 Answer

up vote 3 down vote accepted

As @Mark mentioned, you need to use Pivot Tables.

alt text

Drag the ID to Row Fields and Each product to Data Items section.

alt text

Now move summation of values from column level to row level, because you want groups based on ids, not products, and the desired table is ready.

alt text

link|improve this answer
Great, thanks! I set some design options, such as hide totals, repeat item labels and display as table, and it looks great. The only issue remaining is that I can't use the original column name 'Product A' as the value instead of 'Sum of Product A'. – michielvoo Nov 10 '10 at 12:42
@michiel You can actually rename them - just click on Values dropdown list - Value Field Settings - and provide the desired name under Custom Name – Sathya Nov 10 '10 at 14:47
Unfortunately I can't choose 'Product A' as the name, Excel complains that the name is already used in the pivot table (I think because it's the name of the original column). – michielvoo Nov 11 '10 at 7:33
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.