NESTED IF (Simple Question)

Occasional Visitor

Hi,
I just wanna ask a simple question. A cell containing a value = 0.3
Now i want to use NESTED IF for the following criteria:
if the cell value ranges b/w 0 to 0.25, the result must be 0
if the cell value is greater than 0.25 but less than or equals to 0.5, the result must be 0.5
if the cell value is greater than 0.5, the result must be 1
I am trying but not getting the exact answer
Please guide me with complete condition to be written in Excel for getting the desired result.
Thank You

2 Replies

@SAM_SUNG 

Let's say the value you want to check is in A1, then the formula could be:

 

=LOOKUP(A1,{0,0.25,0.5},{0,0.5,1})

 

 

0.3 is in cell A1
=IF(A1<=0.25,"0",IF(A1<=0.5,"0.5",IF(A1>0.5,"1")))