Formula for chart

yitzymerm

New Member
Joined
Jul 7, 2022
Messages
14
Office Version
  1. 365
Platform
  1. Windows
Please see snapshot of ht & wt chart below, Column C is showing the height, Row 7 are the ages & Row 6 is the category result, and the weight amounts in the chart are the maximum allowed (i.e. Age 25, Height 4.8 can weigh up to 130 to fall into excellent category, at 131 lbs they are already in the 'good' category until 152 etc.)

I would like to be able to enter the Ht, Wt, & age in column B & the result should automatically come up in B4 (excellent, good or poor), please advise simplest & best formula that should be used.

Thanks in advance.

View attachment 80818
 
Try.

The formulas are too complex to debug.
So I am not sure the formula are all right.
And I make some conditional formats to check values easily.

Book.xlsx
ABCDEFGHIJKLMNOPQRSTUVWXY
1Enter M/FMAges20-2425-2930-3940-4950-5960+20-2425-2930-3940-4950-5960+All Ages
2Enter Height5.1Ht/RatingMale - EliteFemale - ElitePreferredStandardClass 2Class 3Class 4Class 6Class 8Class 10Class 12
3Enter Weight2234.8128131132134136138124126130133134135151191202213222231240N/AN/A
4Enter Age604.9131133135137139141126130133136138138154195206217226235244N/AN/A
5Rating ResultClass 24.10135137139141143145131134137139141142158199210221230239249N/AN/A
6Better Rate114.11138140142144146148134137139142144145161203214224233243253N/AN/A
75141143145147149151136139142145147148165207218229239248257266275
85.1145147149151153155140143146149151152169212223233243252261270279
95.2147149152154156158143146149152154155172216227237247256265274283
105.3151153155158160162146149153156158159177221232243253263273282291
115.4156158160162165167151154157161162164183227238249260270280290299
125.5159162164166169171154158161164167168188233244255266277287297306
135.6164166169171174176159162166169171173192239250261272283294304313
145.7168170173175178181163166170173175177197245256268279290302312321
155.8171174176179182185166170173177179181202252264276287298310320329
165.9176179182185187190171174178183185186207259272284296307319329338
175.10182184187190192195175179184187190191212266279291303315326337347
185.11185188191194196199179184187191194195217273286299311323334345355
196191194197199202205185189193197199201223281294307319331342353363
206.1196199201204207210190194198202204206228289302315327339350362372
216.2199202205208211214193197202206208210235297310323335347358371381
226.3206209212215218221200204208212215217241305318331343355367380390
236.4212215218221224227205209214218221223248313326339351363376389399
246.5217220223227230234210215219224227228255321334347359372385398408
256.6224227230234238241217221226232235236263328342355367381394407417
266.7230235238241245248223228234238241243270336350363375390403416426
276.8238241245248252255229235240245248250
286.9243247250254257261236241246251254256
296.10249252256260263267241246251257260262
Sheet(2)
Cell Formulas
RangeFormula
B5B5=IF(B3<=INDEX(IF($B$1="M",$E$3:$J$29,$K$3:$P$29),MATCH($B$2,$D$3:$D$29,0),MATCH($B$4,VALUE(LEFT($E$1:$J$1,2)),1)),"Elite",INDEX($Q$2:$Y$2,1,IFERROR(MATCH($B$3-1,OFFSET($Q2:$Y2,MATCH($B$2,$D$3:$D$29,0),0),1)+1,1)))
B6B6=IF($B$3<=INDEX($Q$3:$Q$29,MATCH($B$2,$D$3:$D$29,0)),B3-INDEX(IF($B$1="M",$E$3:$J$29,$K$3:$P$29),MATCH($B$2,$D$3:$D$29,0),MATCH($B$4,VALUE(LEFT($E$1:$J$1,2)),1)),IF(INDEX($Q$3:$Y$29,MATCH($B$2,$D$3:$D$29,0),IFERROR(MATCH($B$3-1,OFFSET($Q2:$Y2,MATCH($B$2,$D$3:$D$29,0),0),1),1))="",$B$3-INDEX(IF($B$1="M",$E$3:$J$29,$K$3:$P$29),MATCH($B$2,$D$3:$D$29,0),MATCH($B$4,VALUE(LEFT($E$1:$J$1,2)),1)),$B$3-INDEX($Q$3:$Y$29,MATCH($B$2,$D$3:$D$29,0),IFERROR(MATCH($B$3-1,OFFSET($Q2:$Y2,MATCH($B$2,$D$3:$D$29,0),0),1),1))))
Press CTRL+SHIFT+ENTER to enter array formulas.
Cells with Conditional Formatting
CellConditionCell FormatStop If True
Q2:Y2Expression=$B$5=Q$2textNO
Q2:Y2Expression=$D2=$B$2textNO
Q3:Y29Expression=$B$5=Q$2textNO
P1,J1,J3:J29,P3:P29Expression=$B$4>=VALUE(LEFT(J$1,2))textNO
E1:P1,E3:P29,E2,K2Expression=IFERROR(AND($B$4>=VALUE(LEFT(E$1,2)),$B$4<=VALUE(RIGHT(E$1,2))),FALSE)textNO
D3:Y29Expression=$D3=$B$2textNO
Hi HongRu,

Thank you very much for helping me out with this.

I was able to implement it on this chart and on some other similar charts that I had, will mark this done, was truly a great help!!!!!
 
Upvote 0

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Forum statistics

Threads
1,214,947
Messages
6,122,411
Members
449,081
Latest member
JAMES KECULAH

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