AusSteelMan
Board Regular
- Joined
- Sep 4, 2009
- Messages
- 208
Hi everyone,
I am hoping someone can help me with a pivot table problem I am having.
I have a large data set and have used a pivot table to summarise the COUNT of each row (Objects) for each Column Name (that is, I did what Pivot Tables do).
What I'd like to do in a new column is show a string of all the column names per row name.
That doesn't sound clear at all.
I'll try explaining that again from the start.
I have a data set that looks like this:
Sheet3
<COLGROUP><COL style="FONT-WEIGHT: bold; WIDTH: 30px"><COL style="WIDTH: 79px"><COL style="WIDTH: 318px"><COL style="WIDTH: 73px"></COLGROUP><TBODY>
</TBODY>
Excel tables to the web >> Excel Jeanie Html" target="_blank"> Excel Jeanie HTML 4
So I can pivot table to help with other analysis, but what I'd really like to get is a list of unique "Objects" (easy) with all the related "Class"es listed in column (or straight to concatenated). I can concatenate using Chip Pearson's StringConcat.
Here is an example:
Sheet3
<COLGROUP><COL style="FONT-WEIGHT: bold; WIDTH: 30px"><COL style="WIDTH: 64px"><COL style="WIDTH: 67px"><COL style="WIDTH: 77px"><COL style="WIDTH: 82px"><COL style="WIDTH: 80px"><COL style="WIDTH: 151px"></COLGROUP><TBODY>
</TBODY>
<TBODY>
</TBODY>
Excel tables to the web >> Excel Jeanie Html" target="_blank"> Excel Jeanie HTML 4
You can see Chip's Function in col K.
What I'd like to happen is in Cols H to J be automatically populated.
(For this example, I have typed in what I'd like the result to look like)
I considered using Vlookups (with helper column for 2nd & successive instances), INDEX/MATCH with SMALL to get 2nd+ instances and even lengthy IF statements. The main problem with IF is that in the real data set, I can have over 30 Classes.
I looked at Pivot table to see what I could do but haven't much experience in manipulating past regular feature.
I also took a cut&paste of the pivot table (as shown in part below) to see what I could do.
Here is a clip straight from the Pivot Table:
Pivot
<COLGROUP><COL style="FONT-WEIGHT: bold; WIDTH: 30px"><COL style="WIDTH: 412px"><COL style="WIDTH: 116px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 79px"></COLGROUP><TBODY>
</TBODY>
Excel tables to the web >> Excel Jeanie Html" target="_blank"> Excel Jeanie HTML 4
And one from the cut&paste of the pivot table, which also shows the desired outcome in the right hand column:
Sheet2
<COLGROUP><COL style="FONT-WEIGHT: bold; WIDTH: 30px"><COL style="WIDTH: 382px"><COL style="WIDTH: 100px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 79px"><COL style="WIDTH: 64px"><COL style="WIDTH: 508px"></COLGROUP><TBODY>
</TBODY>
Excel tables to the web >> Excel Jeanie Html" target="_blank"> Excel Jeanie HTML 4
So after trying a few things, I thought I would consult the mass-brain that is MrExcel.
Can anybody please help. I would also be fine using <ACRONYM title="visual basic for applications">VBA</ACRONYM>, but its been a while since I did any basic coding so I wouldn't really stand a chance of starting from scratch.
Thanks very much for even just reading this question.
Regards,
Darren
I am hoping someone can help me with a pivot table problem I am having.
I have a large data set and have used a pivot table to summarise the COUNT of each row (Objects) for each Column Name (that is, I did what Pivot Tables do).
What I'd like to do in a new column is show a string of all the column names per row name.
That doesn't sound clear at all.
I'll try explaining that again from the start.
I have a data set that looks like this:
Sheet3
A | B | C | |
1 | Object | Description | Class |
2 | 10041083 | ACTUATOR: AIR REGISTERS BOILERS #2B/STN | BOILERS |
3 | 10042544 | ACTUATOR: PNEU SGL ACT STC GP085 550KPA | BOILERS |
4 | 10042552 | ACTUATOR: ROTORK 7A ELECT WIRING 1411.50 | BOILERS |
5 | 10043203 | BEARING, ROL CYL: CRM14-C3 SKF 1.750IN | BOILERS |
6 | 10043901 | CARRIAGE ASSY: SOOTBLOWER IK520 25BOILER | BOILERS |
7 | 10044217 | ACTUATOR: PNEU SGL ACT S/R 90DEG ES200 | BOILERS |
8 | 10044257 | ACTUATOR: SQ BOX KEYED 3/4" TAYLOR 3492 | BOILERS |
9 | 10044718 | FLUID CPLG: 26"SCOOP CTRL FLUIDRV SCR24R | BOILERS |
10 | 10044730 | FLUID CPLG: 20"SCOOP CTRL FLUIDRV SCR24R | BOILERS |
11 | 10045728 | BELT, V: SPB3170 16 X 13MM SECTION | BOILERS |
12 | 10046893 | DELETED ITEM - NOT AVAILABLE | BOILERS |
13 | 10046896 | BARRICADE: BOILER O/HAULS #2B/STN | BOILERS |
14 | 10048618 | BEARING: NEEDLE ROLLER SJ7285+IR7285 RBC | BOILERS |
15 | 10049388 | NECK&LANTERN RING COMB: 21-23MAKEUP PUMP | BOILERS |
16 | 10041083 | ACTUATOR: AIR REGISTERS BOILERS #2B/STN | Trucks |
17 | 10042544 | ACTUATOR: PNEU SGL ACT STC GP085 550KPA | Cars |
18 | 10042552 | ACTUATOR: ROTORK 7A ELECT WIRING 1411.50 | Trucks |
19 | 10043203 | BEARING, ROL CYL: CRM14-C3 SKF 1.750IN | Bananas |
20 | 10043901 | CARRIAGE ASSY: SOOTBLOWER IK520 25BOILER | Apples |
21 | 10050190 | BELLOWS: 100KPA 450NB FL AS2129D INCO625 | Rockets |
22 | 10050193 | BELLOWS: 150KPA 200NB FLG AS2129D INC825 | Rockets |
23 | 10050196 | BELLOWS: 150KPA 300NB FLG AS2129D INC825 | Engines |
24 | 10050199 | BELLOWS: 150KPA 250NB FLG AS2129D INC825 | Engines |
25 | 10046896 | BARRICADE: BOILER O/HAULS #2B/STN | PUMPS |
26 | 10048618 | BEARING: NEEDLE ROLLER SJ7285+IR7285 RBC | PUMPS |
27 | 10049388 | NECK&LANTERN RING COMB: 21-23MAKEUP PUMP | PUMPS |
28 | 10046896 | BARRICADE: BOILER O/HAULS #2B/STN | FANS |
29 | 10048618 | BEARING: NEEDLE ROLLER SJ7285+IR7285 RBC | FANS |
30 | 10049388 | NECK&LANTERN RING COMB: 21-23MAKEUP PUMP | FANS |
<COLGROUP><COL style="FONT-WEIGHT: bold; WIDTH: 30px"><COL style="WIDTH: 79px"><COL style="WIDTH: 318px"><COL style="WIDTH: 73px"></COLGROUP><TBODY>
</TBODY>
Excel tables to the web >> Excel Jeanie Html" target="_blank"> Excel Jeanie HTML 4
So I can pivot table to help with other analysis, but what I'd really like to get is a list of unique "Objects" (easy) with all the related "Class"es listed in column (or straight to concatenated). I can concatenate using Chip Pearson's StringConcat.
Here is an example:
Sheet3
F | G | H | I | J | K | |
1 | Object | Countif | 1st Class | 2nd Class | 3rd Class | StringConcat |
2 | 10041083 | 2 | BOILERS | Trucks | BOILERS, Trucks | |
3 | 10042544 | 2 | BOILERS | Cars | BOILERS, Cars | |
4 | 10042552 | 2 | BOILERS | Trucks | BOILERS, Trucks | |
5 | 10043203 | 2 | BOILERS | Bananas | BOILERS, Bananas | |
6 | 10043901 | 2 | BOILERS | Apples | BOILERS, Apples | |
7 | 10044217 | 1 | BOILERS | BOILERS | ||
8 | 10044257 | 1 | BOILERS | BOILERS | ||
9 | 10044718 | 1 | BOILERS | BOILERS | ||
10 | 10044730 | 1 | BOILERS | BOILERS | ||
11 | 10045728 | 1 | BOILERS | BOILERS | ||
12 | 10046893 | 1 | BOILERS | BOILERS | ||
13 | 10046896 | 3 | BOILERS | PUMPS | FANS | BOILERS, PUMPS, FANS |
14 | 10048618 | 3 | BOILERS | PUMPS | FANS | BOILERS, PUMPS, FANS |
15 | 10049388 | 3 | BOILERS | PUMPS | FANS | BOILERS, PUMPS, FANS |
16 | 10050190 | 1 | Rockets | Rockets | ||
17 | 10050193 | 1 | Rockets | Rockets | ||
18 | 10050196 | 1 | Engines | Engines | ||
19 | 10050199 | 1 | Engines | Engines |
<COLGROUP><COL style="FONT-WEIGHT: bold; WIDTH: 30px"><COL style="WIDTH: 64px"><COL style="WIDTH: 67px"><COL style="WIDTH: 77px"><COL style="WIDTH: 82px"><COL style="WIDTH: 80px"><COL style="WIDTH: 151px"></COLGROUP><TBODY>
</TBODY>
Spreadsheet Formulas | ||||||
<TBODY> </TBODY> |
<TBODY>
</TBODY>
Excel tables to the web >> Excel Jeanie Html" target="_blank"> Excel Jeanie HTML 4
You can see Chip's Function in col K.
What I'd like to happen is in Cols H to J be automatically populated.
(For this example, I have typed in what I'd like the result to look like)
I considered using Vlookups (with helper column for 2nd & successive instances), INDEX/MATCH with SMALL to get 2nd+ instances and even lengthy IF statements. The main problem with IF is that in the real data set, I can have over 30 Classes.
I looked at Pivot table to see what I could do but haven't much experience in manipulating past regular feature.
I also took a cut&paste of the pivot table (as shown in part below) to see what I could do.
Here is a clip straight from the Pivot Table:
Pivot
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | |
3 | Count of Description | Column Labels | ||||||||||||||||||||||
4 | Row Labels | 2B/STNSV | 30COGBLDR | ATC1 | BLEEDR6BF | BOILERS | BOSVALVES | CIRCLIQ2 | CIRCLIQ4 | CIRCLIQ6 | D085 | D142 | DEMIN | EXHAUSTER | FLUSHLIQ2 | FLUSHLIQ3 | FLUSHLIQ5 | FPCH | OXYCLEAN | OXYLUB | OXYPACKIN | OXYVALVES | SPAREVALV | Grand Total |
5 | 10046178 - BAFFLE: EX/STM ENDOIL U2R 143&203M/45&63 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 7 | |||||||||||||||
6 | 10043112 - BEARING: STEAM END D-R U2R,143M&203M/38 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 7 | |||||||||||||||
7 | 10112506 - STOP: CARBON RING D-R U2R 143M&203M /270 | 1 | 1 | 1 | 1 | 1 | 1 | 6 | ||||||||||||||||
8 | 10103159 - RING: CARBON 2.383"DIA D-R U2R&143M / 46 | 1 | 1 | 1 | 1 | 4 | ||||||||||||||||||
9 | 10046185 - BAFFLE: GOVERNOR OIL D-R 143M&203M / 28 | 1 | 1 | 1 | 1 | 4 | ||||||||||||||||||
10 | 10103167 - RING: CARBON 3.510"DIA D-R 203M / 46 | 1 | 1 | 1 | 3 | |||||||||||||||||||
11 | 10046182 - BAFFLE: EXHAUST END OIL D-R 203M / 63 | 1 | 1 | 1 | 3 | |||||||||||||||||||
12 | 10111927 - SPRING: CARBON RING D-R 203M / 403 | 1 | 1 | 1 | 3 | |||||||||||||||||||
13 | 10111928 - SPRING: CARBON RING D-R U2R&143M / 403 | 1 | 1 | 1 | 3 | |||||||||||||||||||
14 | 10103165 - RING: CARBON 3.507"DIA D-R 203M / 46 | 1 | 1 | 1 | 3 | |||||||||||||||||||
15 | 10049975 - BEARING: TURBINE EXHAUST END D-R 203M/60 | 1 | 1 | 1 | 3 |
<COLGROUP><COL style="FONT-WEIGHT: bold; WIDTH: 30px"><COL style="WIDTH: 412px"><COL style="WIDTH: 116px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 79px"></COLGROUP><TBODY>
</TBODY>
Excel tables to the web >> Excel Jeanie Html" target="_blank"> Excel Jeanie HTML 4
And one from the cut&paste of the pivot table, which also shows the desired outcome in the right hand column:
Sheet2
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | |
1 | Count of Description | Column Labels | ||||||||||||||||||||||||
2 | Row Labels | 2B/STNSV | 30COGBLDR | ATC1 | BLEEDR6BF | BOILERS | BOSVALVES | CIRCLIQ2 | CIRCLIQ4 | CIRCLIQ6 | D085 | D142 | DEMIN | EXHAUSTER | FLUSHLIQ2 | FLUSHLIQ3 | FLUSHLIQ5 | FPCH | OXYCLEAN | OXYLUB | OXYPACKIN | OXYVALVES | SPAREVALV | Grand Total | ||
3 | 10046178 - BAFFLE: EX/STM ENDOIL U2R 143&203M/45&63 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 7 | CIRCLIQ2, CIRCLIQ4, CIRCLIQ6, EXHAUSTER, FLUSHLIQ2, FLUSHLIQ3, FLUSHLIQ5 | ||||||||||||||||
4 | 10043112 - BEARING: STEAM END D-R U2R,143M&203M/38 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 7 | CIRCLIQ2, CIRCLIQ4, CIRCLIQ6, EXHAUSTER, FLUSHLIQ2, FLUSHLIQ3, FLUSHLIQ5 | ||||||||||||||||
5 | 10112506 - STOP: CARBON RING D-R U2R 143M&203M /270 | 1 | 1 | 1 | 1 | 1 | 1 | 6 | CIRCLIQ2, CIRCLIQ4, CIRCLIQ6, FLUSHLIQ2, FLUSHLIQ3, FLUSHLIQ5 | |||||||||||||||||
6 | 10103159 - RING: CARBON 2.383"DIA D-R U2R&143M / 46 | 1 | 1 | 1 | 1 | 4 | CIRCLIQ2, EXHAUSTER, FLUSHLIQ2, FLUSHLIQ3 |
<COLGROUP><COL style="FONT-WEIGHT: bold; WIDTH: 30px"><COL style="WIDTH: 382px"><COL style="WIDTH: 100px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 28px"><COL style="WIDTH: 79px"><COL style="WIDTH: 64px"><COL style="WIDTH: 508px"></COLGROUP><TBODY>
</TBODY>
Excel tables to the web >> Excel Jeanie Html" target="_blank"> Excel Jeanie HTML 4
So after trying a few things, I thought I would consult the mass-brain that is MrExcel.
Can anybody please help. I would also be fine using <ACRONYM title="visual basic for applications">VBA</ACRONYM>, but its been a while since I did any basic coding so I wouldn't really stand a chance of starting from scratch.
Thanks very much for even just reading this question.
Regards,
Darren