# Getting an OR statement to work with nested IF Statements

1. ## Getting an OR statement to work with nested IF Statements

=IF(OR(C224="Kitchen Assistant","Kitchen Chef"),"0",IF(OR(C224="contact Centre","Contact centre 2"),IF(T224>=9,10,IF(T224=8,7.5,IF(T224=7,2.5,"0"))),IF(T224>=9,5,IF(T224=8,3.75,IF(T224=7,1.25,"0")))))

Hello,

Im trying to get the above statement to work, however it wont.
Below is what its started as but then i wanted to add in a OR stament as above so that i can have the inital checks for 2 critira instead of making a huge mess of a formula.

=IF(C226="Kitchen Assistant","0",IF(C226="contact Centre",IF(T226>=9,10,IF(T226=8,7.5,IF(T226=7,2.5,"0"))),IF(T226>=9,5,IF(T226=8,3.75,IF(T226=7,1.25,"0")))))

I hope this is explained well enough let me know if i can provide any more information

2. ## Re: IF or Statement help

Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

(Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)

3. ## Re: Getting an OR statement to work with nested IF Statements

For your first OR, one of the following

OR(C224={"Kitchen Assistant","Kitchen Chef"})

OR(C224="Kitchen Assistant",C224="Kitchen Chef")

Either will work, just showing you the 2 options that you can use.

4. ## Re: Getting an OR statement to work with nested IF Statements

Apart from what Jason gave you to correct your formula, if you are wanting a zero as the output rather than a text remove the quotes around the 0 so the output is actually numeric.
IF(OR(C224="Kitchen Assistant","Kitchen Chef"),"0"...
just a suggestion not knowing how you are using the output.

5. ## Re: Getting an OR statement to work with nested IF Statements

Goos spot, I missed the text zero's.

6. ## Re: Getting an OR statement to work with nested IF Statements

Another possible option...

=IF(C224="Kitchen*",0,IF(C224="contact*",IF(T224>=9,10,IF(T224=8,7.5,IF(T224=7,2.5,0))),IF(T224>=9,5,IF(T224=8,3.75,IF(T224=7,1.25,"0")))))

However, that last part (bolded) looks wrong...
...IF(T224>=9,5,IF(T224=8,3.75,IF(T224=7,1.25,"0")))))
either you are missing an argument after 9.5 or your logic is wrong.
IF(T224>=9,5...if that part is TRUE, then the next part is not possible. For this to be TRUE, T224 must be >= 9.5, so therefor T224=8 wont be tested, nor would T224=7

7. ## Re: Getting an OR statement to work with nested IF Statements

The whole thing looks wrong, Ford!

I came up with =IF(LEFT(C224,7)="Kitchen",0,LOOKUP(T224,{0,7,8,9},{0,2.5,7.5,10})/IF(LEFT(C224,7)="Contact",2,1)) while I was waiting for the OP to respond to the existing suggestions, but I'm not entirely convinced. Trying to break down messy formulas without knowing what they are meant to be doing is not one of my favourite pastimes.

Nearly forgot to ask, is the wildcard in a logical test a new feature in an unreleased version of excel? You're the second person to suggest it recently, but I can't get it to work

There are currently 1 users browsing this thread. (0 members and 1 guests)