Pivot table?

Emm

Board Regular
Joined
Nov 29, 2004
Messages
165
Hi all,

I'm new to Pivot Tables ... and not sure if this is what I should be trying to use.

To keep it simple, I have a List with two columns.
1. CAT
2. ITEM

CAT has Hardware, Timber, Paint, Glazing etc...
ITEM has many items using those Categories.

How can I Pivot the list around so my CAT become Table headers,
and ITEMS become the records under each CAT?

I'm currently using VBA to extract unique CAT items, paste them as headers, then filter the list on each CAT value, copy and paste under each CAT column.

It is VERY slow, and there must be a better way...

Thanks,

Keith
 
Last edited:

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Hi Emm,

Can you please show a sample of the the output you are expecting?

is it like this?

CAT1CAT2CAT3
ITEM1ITEM5ITEM9
ITEM2ITEM6ITEM10
ITEM3ITEM7ITEM11
ITEM4ITEM8ITEM12

<colgroup><col width="64" span="3" style="width:48pt"> </colgroup><tbody>
</tbody>

If so, I believe you cannot do this with a pivot table

What you are doing with VBA and manually filtering you could do with formulas, you can have formulas in a row to always show the set of unique items from a dataset, and below that in each column have formulas that show unique items where CAT matches the header of that column. Let me know if this approach would help you...

With pivot you could produce either something like this
CAT1CAT2CAT3
ITEM1ITEM4ITEM7ITEM2ITEM5ITEM8ITEM3ITEM6ITEM9

<colgroup><col><col span="9"></colgroup><tbody>
</tbody>

or this

categoryitems
CAT1
ITEM1
ITEM4
ITEM7
CAT2
ITEM2
ITEM5
ITEM8
CAT3
ITEM3
ITEM6
ITEM9

<colgroup><col><col></colgroup><tbody>
</tbody>

Or this:
Count of itemscategory
itemsCAT1CAT2CAT3
ITEM11
ITEM71
ITEM41
ITEM31
ITEM91
ITEM81
ITEM21
ITEM61
ITEM51

<colgroup><col><col span="3"></colgroup><tbody>
</tbody>
 
Upvote 0
Hi Istiasztalos,

Thanks for your detailed response.
Yes, the first item is exactly what I am doing.
Basically, I’m creating validation lists for categories in a price list.
I have 55 categories, and about 7000 items.
I’m using unique extract on the CAT to create Headers across a sheet,
Then filtering on each CAT and copying the items under the new header.
It works, but it’s a case of running the code, then go and make a coffee and wait till it’s finished.
Thought there may have been a quicker way ..

Thanks again for your help.

Emm..
 
Upvote 0

Forum statistics

Threads
1,215,094
Messages
6,123,071
Members
449,092
Latest member
ipruravindra

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