IF function error

Brass Contributor

SUDHAKARFRONTIER_0-1628047917663.png

Dear Friends,

Kindly help me the below error,

i have written the IF condition like

0.50 > GREEN, Refer the column - j2>=0.50, t2>=0.50, "green",

0< RED, Refer the column - j2<=0, t2<=0, "red",

0.49 to 0 , AMBER refer the column - j2<=0.49, t2<=0.49, "Amber".

=IFS(OR(J2>=0.5, T2>=0.5),"GREEN",OR(J2<=0.01,T2<=0.01),"RED",OR(J2<=0.49, T2<=0.49),"AMBER").

when i try this same i am getting error, values 0.03 suppose this should be AMBER but its shows RED i have attached this same image . please help me the issue. 

 

7 Replies

@SUDHAKAR-FRONTIER You need to use AND in stead of OR.

This formula will result in AMBER in U2.

 

=IFS(AND(J2>=0.5, T2>=0.5),"GREEN",AND(J2<=0.01,T2<=0.01),"RED",AND(J2<=0.49, T2<=0.49),"AMBER")

 

 

@Riny_van_Eekelen 

 

Still i am getting error please find the below image

SUDHAKARFRONTIER_0-1628092248426.png

 

@SUDHAKAR-FRONTIER An image is no good. I'd need the file to look at.

@Riny_van_Eekelen 

Please find the Attached file.

If possible kindly help (b2<=10.00, c2<=10.00) "GREEN +",

Between 50 to 10 need to display Green.

@SUDHAKAR-FRONTIER Well, with this data it seems that OR in all three conditions works as intended. It didn't when I replicated the data from your initial data set.

@Riny_van_Eekelen

Still same error, Suppose the highlighted cases to be Amber but its coming RED. same attached below

SUDHAKARFRONTIER_0-1628094331240.png

 

 

@SUDHAKAR-FRONTIER Your problem is that these rows qualify for two if the three criteria when you use OR.  The IFS function stops evaluating the formula as soon as a criteria is met. 

 

When you use AND, some rows will return #N/A as none of the criteria are met. Make sure that all possible criteria are correctly set and that there is no overlap between them.