Unable to use pivot table on merged header. Any other ideas?

Goddess

Board Regular
Joined
Dec 3, 2015
Messages
94
Office Version
  1. 2019
Platform
  1. Windows
Hi,

I have a range of cells, where I'm trying to use pivot to summarize the data. However, pivot table can't be used on merged cells (header). Any idea how to achieve the result I want (under Pivot?)? The Group in column A may change, depending on the entities of the company that I'm analysing. As such, I can't use the standard sum formula, as I may have 5 entities in a group today, tomorrow it may change to 4. Thus, I need a way to sum by the group, regardless of how many entities are there.

Thanks!

sample.xlsx
ABCDEFGHIJK
1
2Data
3GroupCompanyAppleOrangeTotal
4QuantityQuantity
5JanFebMarAprJanFebMarApr
61ABC1055548432
71DEF5002014214
82GHI6511022118
92JKL4058602530
103MNO1582500829
11Total171019181671620123
12
13
14Pivot?
15AppleSum for AppleOrangeSum for Orange
16JanFebMarAprJanFebMarApr
1716057185512628
18ABC105511548421
19DEF5002701427
2021056930624618
21GHI65111302215
22JKL405817602513
233158216500813
24MNO158216500813
25Total1710191864167162059
Sheet1
Cell Formulas
RangeFormula
K6:K11K6=SUM(C6:J6)
C11:J11C11=SUM(C6:C10)
G20:J20,B20:E20,G17:J17,B17:E17B17=SUM(B18:B19)
G23:J23,B23:E23B23=SUM(B24)
K17:K24,F17:F25F17=SUM(B17:E17)
G25:K25,B25:E25B25=B17+B20+B23
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
A Pivot Table Pivots a Table.
Your Data is not in a Table format as Excel defines one.
You will need to Unpivot the Data or have your data sourced into a proper Table.

Watch Mike Girvin's Explanation on Proper Data Sets and other related subjects.

PowerQuery can do the Unpivot and Mike has a video on that too.
 
Upvote 0
A Pivot Table Pivots a Table.
Your Data is not in a Table format as Excel defines one.
You will need to Unpivot the Data or have your data sourced into a proper Table.

Watch Mike Girvin's Explanation on Proper Data Sets and other related subjects.

PowerQuery can do the Unpivot and Mike has a video on that too.
Great! Thanks!
 
Upvote 0

Forum statistics

Threads
1,215,563
Messages
6,125,560
Members
449,237
Latest member
Chase S

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