Forum Discussion
Embry3894
Mar 23, 2022Copper Contributor
Help with If function with 12 conditions
=IF(G98<=1,"0",IF(G98>=1,"40",IF(G98>=2,"48",IF(G98>=3,"56",IF(G98>=4,"64",IF(G98>=5,"80",IF(G98>=6,"88",IF(G98>=7,"96",IF(G98>=8,"104",IF(G98>=9,"112",IF(G98>=10,"120",IF(G98>10,"120")))))))))))) ...
- Mar 23, 2022
I think that IF(G98<=1,"0", IF(G98>=1,"40" need to be corrected to =IF(G98<1,"0",IF(G98>=1,"40".
You may write the formula as below.
=INDEX({0,40,48,56,64,80,88,96,104,112,120},MATCH(G98,{0,1,2,3,4,5,6,7,8,9,10}))
Patrick2788
Mar 23, 2022Silver Contributor
Try this instead:
=VLOOKUP(G98,{0,0;1,40;2,48;3,56;4,64;5,80;6,88;7,96;8,104;9,112;10,120},2,1)
=VLOOKUP(G98,{0,0;1,40;2,48;3,56;4,64;5,80;6,88;7,96;8,104;9,112;10,120},2,1)
Embry3894
Mar 23, 2022Copper Contributor
This is not providing me with correct numbers.
G value of 0.02- 0.28 is giving result of 40 and it needs to be 0.
G Value of 0.29 - 0.86 is giving result of 48 and it needs to be 0.
G value of 0.02- 0.28 is giving result of 40 and it needs to be 0.
G Value of 0.29 - 0.86 is giving result of 48 and it needs to be 0.
- HansVogelaarMar 23, 2022MVP