SOLVED

Excel formula for 3 condition

Copper Contributor

Hai,

 

I have some problem with formula in excel when i has 3 condition that need follow,

Condition 1 : High <= 5, True, False

Condition 2 : Medium<=20, True,False

Condition 3 : Low<=30,True,False

 

I've try create this formula but cannot work. Anyone who can help me please...

=IF(OR(AND(A1=M, A1<=35), AND(A1>=H, A1<=5), AND(A1>=L, A1<=55)), "True", "False")

6 Replies
best response confirmed by Firdaus Ahmad (Copper Contributor)
Solution

I don't understand what you're trying to do.

 

You can't use a formula like A1=M because M is not valid; if A1 can be the letter M you have to use A1="M" (with ").

But if A1 it's equal to "M", can't be at the same time compared with a number.

 

I don't get what you want from the formula and what are the datas in play.

 

Enlight us so we can help!

Hello,

 

assuming the cell A1 has a number, try this:

 

=IF(A1<=5,"H",if(A1<=35,"M",if(A1<=55,"L","neither")))

 

In words: If A1 is less than or equal to 5, return the letter "H", else, if A1 is less than or equal to 35, return the letter "M", else if A1 is less than or equal to 55, return the letter "L", else return "neither".

 

If that does not help, please post a sample workbook, mock up the desired result and explain the logic.

 

 

 

=if(A1<=5;"H";if(A1<=35;"M";if(A1<=55;"L";"neither")))

 

Did you use the semikolon ? I try this formula and it works :) 

Only a normal comma didn't work.

@Roland Wollenschläger comma or semicolon is a regional setting. European languages use the semicolon in formulas, most other regions use the comma. 

thanks a lot...

already solve the issue with your advice... I just add letter M with " "..

But how can A1 be = "M" AND also a number <35???? That can never be TRUE, so what is the point of that IF condition?

 

1 best response

Accepted Solutions
best response confirmed by Firdaus Ahmad (Copper Contributor)
Solution

I don't understand what you're trying to do.

 

You can't use a formula like A1=M because M is not valid; if A1 can be the letter M you have to use A1="M" (with ").

But if A1 it's equal to "M", can't be at the same time compared with a number.

 

I don't get what you want from the formula and what are the datas in play.

 

Enlight us so we can help!

View solution in original post