Solution (sort of) to repeating table headers

JenniferMurphy

Well-known Member
Joined
Jul 23, 2011
Messages
2,691
Office Version
  1. 365
Platform
  1. Windows
I discovered a couple of ways to get repeating table headers that do not need the kludgy sequence numbers that Excel will add.

In this first solution, I add my own sequence numbers and then change the color of that character to the background color so that they are not visible. It is a bit of work, and you have to be careful that references are to the right section.

2022 NBA playoff odds.xlsx
BCDEFGHIJKLMNO
4$100Wager
5
65/04/22Entering Round 2Entering Round 1
7TeamMoneyline Odds3Rank3Payout3 on $100% Odds3Moneyline Odds2Rank2Payout2 on $100% Odds2Moneyline Odds1Rank1Payout1 on $100% Odds1
8Phoenix Suns+2001$30033%+3202$42024%+2601$36028%
9Golden State Warriors+3402$44023%+3001$40025%+10004$1,1009%
10Boston Celtics+4503$55018%+3753$47521%+7503$85012%
11Miami Heat+4503$55018%+5004$60017%+10004$1,1009%
12Milwaukee Bucks+6005$70014%+7005$80013%+5002$60017%
13Memphis Grizzlies+18006$1,9005%+13006$1,4007%+12006$1,3008%
14Philadelphia 76ers+66007$6,7001%+25008$2,6004%+16007$1,7006%
15Dallas Mavericks+66007$6,7001%+20007$2,1005%+40008$4,1002%
NBA (1)
Cell Formulas
RangeFormula
E8:E15E8=RANK.EQ([@[Moneyline Odds3]],[Moneyline Odds3],1)
F8:F15F8=cvtodds([@[Moneyline Odds3]],"M","$")*Wager
G8:G15G8=cvtodds([@[Moneyline Odds3]],"M","%")
I8:I15I8=RANK.EQ([@[Moneyline Odds2]],[Moneyline Odds2],1)
J8:J15J8=cvtodds([@[Moneyline Odds2]],"M","$")*Wager
K8:K15K8=cvtodds([@[Moneyline Odds2]],"M","%")
M8:M15M8=RANK.EQ([@[Moneyline Odds1]],[Moneyline Odds1],1)
N8:N15N8=cvtodds([@[Moneyline Odds1]],"M","$")*Wager
O8:O15O8=cvtodds([@[Moneyline Odds1]],"M","%")
Named Ranges
NameRefers ToCells
'NBA (1)'!Wager='NBA (1)'!$B$4J8:J15, N8:N15, F8:F15


The CvtOdds function is a UDF I wrote.

Another solution it to make each section a separate table.

2022 NBA playoff odds.xlsx
BCDEFGHIJKLMNO
4$100Wager
5
6Today (5/06/22)Entering Round 2Entering Round 1
7TeamMoneyline OddsRankPayout on $100% OddsMoneyline OddsRankPayout on $100% OddsMoneyline OddsRankPayout on $100% Odds
8Phoenix Suns+2001$30033%+3202$42024%+2601$36028%
9Golden State Warriors+3402$44023%+3001$40025%+10004$1,1009%
10Boston Celtics+4503$55018%+3753$47521%+7503$85012%
11Miami Heat+4503$55018%+5004$60017%+10004$1,1009%
12Milwaukee Bucks+6005$70014%+7005$80013%+5002$60017%
13Memphis Grizzlies+18006$1,9005%+13006$1,4007%+12006$1,3008%
14Philadelphia 76ers+66007$6,7001%+25008$2,6004%+16007$1,7006%
15Dallas Mavericks+66007$6,7001%+20007$2,1005%+40008$4,1002%
NBA
Cell Formulas
RangeFormula
E8:E15,M8:M15,I8:I15E8=RANK.EQ([@[Moneyline Odds]],[Moneyline Odds],1)
F8:F15,N8:N15,J8:J15F8=cvtodds([@[Moneyline Odds]],"M","$")*Wager
G8:G15,O8:O15,K8:K15G8=cvtodds([@[Moneyline Odds]],"M","%")
Named Ranges
NameRefers ToCells
Wager=NBA!$B$4J8:J15, N8:N15, F8:F15


Each one has advantages.

Any comments?
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
Making each section a separate table has too many disadvantages. The "hidden" header sequence numbers method works better, but I didn't like that they caused the headers to not be centered properly. My solution is to put the sequence number on the left followed by a line feed (Alt+Enter). This has the added advantage of adding more leading. The minisheet is below. I'm including a screen capture to show how it really looks.

1652117543613.png


And here is the minisheet.
2022 NBA playoff odds.xlsx
BCDEFGHIJKLMNOPQRSTUV
5$100Wager
6
7"ML" = MoneyLine odds Payout is on $100 wagerMay 9, 2022 Warriors Up 2-1May 5, 2022 Series Tied 1-1Entering Round 2 vs Memphis #2 Warriors Beat Denver 4-1Entering Round 1 Warriors #3 vs Denver #6
8Team4 ML4 Rank4 Δ4 Payout4 Odds3 ML3 Rank3 Δ3 Payout3 Odds2 ML2 Rank2 Δ2 Payout2 Odds1 ML1 Rank1 Payout1 Odds
9Golden State Warriors+2221+1$32231%+3402-1$44023%+3001+3$40025%+10004$1,1009%
10Phoenix Suns+3002-1$40025%+2001+1$30033%+3202-1$42024%+2601$36028%
11Milwaukee Bucks+4503+2$55018%+6005=0$70014%+7005-3$80013%+5002$60017%
12Miami Heat+6504-1$75013%+4503+1$55018%+5004=0$60017%+10004$1,1009%
13Boston Celtics+7005-2$80013%+4503=0$55018%+3753=0$47521%+7503$85012%
14Philadelphia 76ers+11486+1$1,2488%+66007+1$6,7001%+25008-1$2,6004%+16007$1,7006%
15Dallas Mavericks+20007=0$2,1005%+66007=0$6,7001%+20007+1$2,1005%+40008$4,1002%
16Memphis Grizzlies+35008-2$3,6003%+18006=0$1,9005%+13006=0$1,4007%+12006$1,3008%
NBA
Cell Formulas
RangeFormula
E9:E16E9=RANK.EQ([@[4 ML]], [4 ML] ,1)
F9:F16F9=[@[3 Rank]]-[@[4 Rank]]
G9:G16G9=cvtodds([@[4 ML]],"M","$")*Wager
H9:H16H9=cvtodds([@[4 ML]],"M","%")
J9:J16J9=RANK.EQ([@[3 ML]],[3 ML],1)
K9:K16K9=[@[2 Rank]]-[@[3 Rank]]
L9:L16L9=cvtodds([@[3 ML]],"M","$")*Wager
M9:M16M9=cvtodds([@[3 ML]],"M","%")
O9:O16O9=RANK.EQ([@[2 ML]],[2 ML],1)
P9:P16P9=[@[1 Rank]]-[@[2 Rank]]
Q9:Q16Q9=cvtodds([@[2 ML]],"M","$")*Wager
R9:R16R9=cvtodds([@[2 ML]],"M","%")
T9:T16T9=RANK.EQ([@[1 ML]],[1 ML],1)
U9:U16U9=cvtodds([@[1 ML]],"M","$")*Wager
V9:V16V9=cvtodds([@[1 ML]],"M","%")
Named Ranges
NameRefers ToCells
Wager=NBA!$B$5G9:G16, U9:U16, Q9:Q16, L9:L16
 
Upvote 0
Here's another example from the finals. Sadly, my Warriors got whupped in game 1 and lost home court advantage 😯, but are still favored.

1654301988992.png
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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