If Statement using OR/AND

spyldbrat

Board Regular
Joined
May 5, 2002
Messages
211
Office Version
  1. 365
Hello,

I need an if statement with multiple conditions. I know that I should be using OR and AND in the formula but I have not clue how to write it but nor am I am even sure if it can include this many conditions. Below is what I need to be in the entire formula.

If N2 = Mismatch AND O2 = Mismatch then "DELETE"
If Q2 = Not Uploaded then "Inv Not Uploaded to Platform"
If N2 = Match and P2 = Paid then "Give To Collections For Follow-Up"
If O2 = Mismatch then "Inv Amt Doesn't Agree"
If N2 = Mismatch AND L2>1 then "Uploaded Inv # Doesn't Match"

Any help would be appreciated.

Thank you.
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
=IF(AND(N2="Mismatch",O2="Mismatch"),"DELETE",IF(Q2="Not Uploaded","Inv not uploaded to Platform",IF(AND(N2="Match",P2="Paid"),"Give Collections for Follow-up",IF(O2="Mismatch","Inv Amt doesn't agree",IF(AND(N2="Mismatch",L2>1),"Uploaded Inv # doesn't match")))))

The order of IF conditions is important so hopefully you have listed them in order of importance going from most to least important.
 
Upvote 0
Hi. Sorry it took so long to get back. The formula works, but is displaying the word "FALSE" where if/and is applied instead of what is in the quotes. I had to make some modifications to your formula based on my spreadsheet (my fault, not yours), but it was displaying false prior to my changes. Based on what I am reading, I need a true and false statement, but each time I try to add another condition, my brain just wants to make the condition the next if statement. Below is the modified formula. Any suggestions would be appreciated.

=IF(Q2="Not Uploaded","Inv not uploaded to Platform", IF(AND(M2-K2<>0,Q2="blank"),"Inv Amt doesn't agree", IF(AND(N2="Match",O2="Match",Q2="blank"),"DELETE", IF(AND(N2="Match",P2="Paid"),"Give Collections for Follow-up", IF(AND(L2-J2<>0,Q2="blank"),"Uploaded Inv # doesn't match")))))

I am getting "FALSE" result on the following:

IF(AND(M2-K2<>0,Q2="blank"),"Inv Amt doesn't agree"


IF(AND(N2="Match",O2="Match",Q2="blank"),"DELETE"

IF(AND(N2="Match",P2="Paid"),"Give Collections for Follow-up"

IF(AND(L2-J2<>0,Q2="blank"),"Uploaded Inv # doesn't match"
 
Upvote 0
IF() statements comprise of a condition and two values, one for when the condition is TRUE, the other for when the condition is FALSE.
Your last IF statement only has a value for when TRUE, if you don't supply a value for FALSE you just get the value FALSE.

From this I would say NONE of your conditions are TRUE hence the last condtion fails and brings up FALSE.

Maybe put something like this in

=IF(Q2="Not Uploaded","Inv not uploaded to Platform", IF(AND(M2-K2<>0,Q2="blank"),"Inv Amt doesn't agree", IF(AND(N2="Match",O2="Match",Q2="blank"),"DELETE", IF(AND(N2="Match",P2="Paid"),"Give Collections for Follow-up", IF(AND(L2-J2<>0,Q2="blank"),"Uploaded Inv # doesn't match","NO CONDITIONS ARE TRUE")))))

If you think some of the conditions should apply then you need to look closely at the data.

You can't upload files to this forum so the only option to look at the data would be to upload the spreadsheet to a file storage website and post a link to the file here.
 
Upvote 0
I agree entirely with Special-K above. Looking at what you are doing though, I thought that you may simply want a blank field when no conditions are true. If that is the case, simply replace the red text above with ""
 
Upvote 0

Forum statistics

Threads
1,223,902
Messages
6,175,278
Members
452,629
Latest member
SahilPolekar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top