Forum Discussion
Excel formula for 3 condition
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")
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!
6 Replies
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.
- Roland WollenschlägerCopper Contributor
=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.
- Arul TresoldiIron Contributor
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!
- Firdaus AhmadCopper Contributorthanks 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?