# Combining IF functions

1. ## Combining IF functions

Hi

Really hoping someone can help me here!

I currently have 2 IF functions in different columns to return the same result. I really need to combine the two IF functions into the same column, but cant resolve the conflicts:

=IF(U22<R22,"N/A",IF(W22>P22,"PASS","FAIL"))

=IF(AND(T21="FAIL", Z21="TAPE TRAFFIC"), "FAIL"," ")

Essentially, I would like the search to return a result of:
- PASS or
- FAIL or
- TAPE TRAFFIC or
- N/A If none of the above

This may not even be possible, but all thoughts are welcome!

Many thanks

Neil

2. ## Re: Combining IF functions

Hi,

I think you need to tell us which of the two should take precedence. (Assuming I understand your problem)

Rgds

3. ## Re: Combining IF functions

What logic results in "TAPE TRAFFIC" appearing? You didn't represent that in your examples.

Also, the ORDER that these tests are conducted is critical to get right. IF U22<R22, the the result will be "N/A" and nothing else will evaluate. Please list the logic steps in order you want them tested.

U22<R22 = "N/A"
W22>P22 = "PASS"
T21="FAIL" and Z21="TAPE TRAFFIC" = "FAIL"
???? = "TAPE TRAFFIC"
???? = " "

4. ## Re: Combining IF functions

Hi guys

Many thanks for the comments

Unfortuantely, I posted the wrong criteria on my original post. The two calculations i am trying to combine are into one search:

=IF(S22<R22,"N/A",IF(V22>P22,"PASS","FAIL"))
=IF(AND(T21="FAIL", Y21=" TAPE TRAFFIC"), "FAIL"," ")

TAPE TRAFFIC calculation is determined by:

=IF(AND(T21="FAIL",S21<R21),"TAPE TRAFFIC","")

So the order would need to be:
1.)PASS (if V22>P22)
2.)FAIL (if V22<P22 or IF(AND(T21="FAIL",S21<R21),"TAPE TRAFFIC")
3.)N/A (if S22<R22)

I have managed to confuse myself on this, but im sure this is what i need

Many thanks

Neil

5. ## Re: Combining IF functions

You listed TAPE TRAFFIC as a separate possible result, but you failed to list it in the order of criteria....you merged it into the second one which leads to more confusion.

If there are 4 possible answers, you should have 4 lines of order, yes? Or for this need, is there really only 3 needed?

If only 3, then try:
=IF(V22>P22, "PASS", IF(OR(V22<P22, AND(T21="FAIL", S21<R21)), "FAIL", IF(S22<R22, "N/A", "")))

6. ## Re: Combining IF functions

Thank you JBeaucaire!!

That worked. Much appreciated mate

Neil

##### Users Browsing this Thread

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

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1