Jul 14 2023 12:46 PM
Hi
I'm trying to write a logical formula for the first time and am not succeeding.
The formula needs to work as follows:
if the value is less than 12, then 2.0
if the value is 12 to less than 18, then 1.5
if the value is 18 or more, then 1.25
I appreciate any help that can be offered.
Thank you
Jul 14 2023 12:56 PM
Jul 14 2023 04:05 PM
Jul 14 2023 04:13 PM - edited Jul 14 2023 04:14 PM
if the value is less than 12, then 2.0
if the value is 12 to less than 18, then 1.5
if the value is 18 or more, then 1.25
Suppose the value is in cell A1. Here are several options you can try:
1) Using IFS
=IFS(A1<12,2,A1<18,1.5,TRUE,1.25)
2) Using nested IF
=IF(A1<12,2,IF(A1<18,1.5,1.25))
3) Using XLOOKUP
=XLOOKUP(A1,{0,12,18},{2,1.5,1.25},,-1)
Jul 14 2023 04:38 PM
Aug 04 2023 06:44 PM