How to manage table headings

JenniferMurphy

Well-known Member
Joined
Jul 23, 2011
Messages
2,525
Office Version
  1. 365
Platform
  1. Windows
I keep running into situations where the table heading names are unnatural and cumbersome because they must be unique. This is the most recent example. This table contains information about the true makeup of a can of nuts labelled "Whole Cashews". Looking at the contents, it seems like most of the cashews are "whole" (intact), but not nearly all of them. Curious, I separated them into 3 groups: Whole, Half, and Fragment. Then I weighed and counted them.(1)

So, for each category, I have 5 columns: Weight, Weight %, Count, Count %, and Weight Each. I would like a nice compact, easy-to-read table like this:

1643524646314.png


But the best I can do using the Table facility is this, which for me is distinctly inferior in appearance and readability:

Advertising Checks.xlsx
BCDEFGHIJKLMNOPQRSTU
4All CashewsWhole CashewsHalf CashewsCashew Fragments
5DateCan WtTotal WtTotal Wt%Whole Wt%Whole #%Whole WtWhole #Whole Wt EaHalf Wt%Half #%Half WtHalf #Half Wt EaFrag Wt%Frag #%Frag #Frag WtFrag Wt EaTotal #
61/29/22517g523g101%72%44%377g2661.42g18%22%95g1320.72g10%35%21151g0.24g609
Planters Whole Cashews
Cell Formulas
RangeFormula
D6D6=[@[Whole Wt]]+[@[Half Wt]]+[@[Frag Wt]]
E6E6=[@[Total Wt]]/[@[Can Wt]]
F6F6=[@[Whole Wt]]/[@[Total Wt]]
G6G6=[@[Whole '#]]/[@[Total '#]]
J6J6=[@[Whole Wt]]/[@[Whole '#]]
K6K6=[@[Half Wt]]/[@[Total Wt]]
L6L6=[@[Half '#]]/[@[Total '#]]
O6O6=[@[Half Wt]]/[@[Half '#]]
P6P6=[@[Frag Wt]]/[@[Total Wt]]
Q6Q6=[@[Frag '#]]/[@[Total '#]]
T6T6=[@[Frag Wt]]/[@[Frag '#]]
U6U6=[@[Whole '#]]+[@[Half '#]]+[@[Frag '#]]

Is there any way to make the Table look more like the example? I am mainly talking about the headings.

I wish Excel had an option for multi-row headings where the reference labels are some combination of each row and cells in one row that span several columns are shared by the other column rows.

(1) Yes, Alan, I know what you are thinking. If I have time for silliness like this, I have time to learn Power Query.
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
I did try one solution that I think ought to work but doesn't. I tried using the the Number format to change the formatting of one of the headings from General to "Num". It accepted the format, but it did not change the text of the heading.
 
Upvote 0
I tried a few options but they might all cause you grief further down the track.
eg.
1) Use headings like the below and select the word "Whole" and format it using the same colour as the background color.
This would leave only the common part visible.
Wt% Whole, #% Whole, Wt Whole, # Whole
You would still see the full column name in the formulas

2) Add a different number of spaces to matching headings/
It wouldn't be very clear in formulas which column you are using though.

3) Copy you current headings into the body of the table and make them how you would like to see them.
Then turn off the Header Row on the table, so the unique heading names are no longer visible.
If you do it in order the formulas will still auto expand with the table.
Fixing a corrupted formula that needs to be copied across all rows would be a bit painful.
Adding a filter to the table would automatically make the hidden header row visible again,
Having the 2 header rows in the body of the table could also cause you grief.
 
Upvote 0
Solution
Sorry I don’t have a better option for you.
I'm afraid that's because there isn't one. Thanks for trying.

I went to the trouble to set up a table like I used to do before I was nudged over to tables. It takes a lot more setup and maintenance work, but I can get a nice compact, readable table. Here's a screen shot because the minisheet doesn't preserve all of the formatting. I like to use a light blue background to indicate data entry cells. All others are calculated.

1643547692012.png

It's too bad that the table feature doesn't allow for something like that.

And here's the minisheet. It isn't reporting the formulas correctly. They should all have @ signs. The first one in D5 is actually =@WtWhole+@WtHalf+@WtFrag because all of the columns are infinite named ranges ($D:$D). The same is true for the header row ($4:$4) and the averages row ($7:$7). Interestingly, the minisheet got the formula in D7 right.
Advertising Checks.xlsx
BCDEFGHIJKLMNOPQRSTU
3All CashewsWhole CashewsHalf CashewsCashew Fragments
4DateCan WtWt%#Wt%#%Wt#Wt EaWt%#%Wt#Wt EaWt%#%Wt#Wt Ea
51/26/22517g523g101%60972%44%377g2661.42g18%22%95g1320.72g10%35%51g2110.24g
61/29/22517g551g107%55972%48%398g2681.49g17%21%91g1180.77g11%31%62g1730.36g
7Averages537g104%58472%46%388g2671.45g17%21%93g1250.75g11%33%57g1920.30g
Planters Whole Cashews (2)
Cell Formulas
RangeFormula
D5:D6D5=WtWhole+WtHalf+WtFrag
E5:E6E5=WtAll/WtCan
F5:F6F5=NumWhole+NumHalf+NumFrag
G5:G6G5=WtWhole/WtAll
H5:H6H5=NumWhole/NumAll
K5:K6K5=WtWhole/NumWhole
L5:L6L5=WtHalf/WtAll
M5:M6M5=NumHalf/NumAll
P5:P6P5=WtHalf/NumHalf
Q5:Q6Q5=WtFrag/WtAll
R5:R6R5=NumFrag/NumAll
U5:U6U5=WtFrag/NumFrag
D7:U7D7=AVERAGE(OFFSET(@Hdr,1,0),OFFSET(@Avgs,-1,0))
 
Upvote 0
1) Use headings like the below and select the word "Whole" and format it using the same colour as the background color.
I thought I tried this before, but apparently not. I just tried it again and it seems be working.

Here's a table I created to see how the final Olympic medal totals would be different if the medals were weighted. This one is sorted by the column that weights the medals: 4-2-1 for Gold, Silver, & Bronze. I had to put a character both before and after the visible header to keep it centered.

Olympic Medals.xlsx
BCDEFGHIJKL
3MedalsWeighted TotalsRankings
4CountryGoldSilverBronze111321421.111..321..421..Gold.
5Norway168133777931111
6Germany121052761733222
7ROC612143256622339
8United States81072551595444
9Sweden8551839476654
10Canada481426424645611
11Austria7741839466667
12Netherlands8541738469864
13China94215374611963
14Switzerland7251430371211107
15France57214313612101110
16Japan3691830336111212
17Italy2781728309131313
18South Korea2529182014141413
19Finland2248141615151513
20Slovenia2327141616151513
21New Zealand210381018171713
22Australia12148917171818
23Hungary10235618191918
24Great Britain11025620191918
25Belgium10124520212118
26Czech Republic10124520212118
27Slovakia10124520212118
28Belarus02024420212424
29Spain01012225252524
30Ukraine01012225252524
31Estonia00111125272724
32Latvia00111125272724
33Poland00111125272724
20220221
Cell Formulas
RangeFormula
G5:G33G5=3*[@Gold]+2*[@Silver]+1*[@Bronze]
H5:H33H5=4*[@Gold]+2*[@Silver]+1*[@Bronze]
I5:I33I5=RANK.EQ([@111],[111])
J5:J33J5=RANK.EQ([@321],[321])
K5:K33K5=RANK.EQ([@421],[421])
L5:L33L5=RANK.EQ([@Gold],[Gold])


Hmmm... It looks like the minisheet ignored the character colors. Here's how it really looks:

1645507522265.png


Thanks for that suggestion.
 
Upvote 0
Thanks for showing us the end product. Glad it helped.
I also tried your solution #3 with a slight modification. Instead of copying the header row inside the table, I copied it just above the table. Then when I turn the header off, I move it down a row. That also works pretty well. If I need to add a column or do anything else that would be easier with the header row on, I just move the faux header up 1 row and turn the header back on. After I make whatever changes I need, I repeat the steps above.

I'm not sure which one I like better.
 
Upvote 0

Forum statistics

Threads
1,214,429
Messages
6,119,424
Members
448,896
Latest member
MadMarty

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