I am trying to create a formula using IF and AND that will test for 2 conditions before producing a true or false result. Can anyone please advise how to do this?
Many thanks
I am trying to create a formula using IF and AND that will test for 2 conditions before producing a true or false result. Can anyone please advise how to do this?
Many thanks
Create each formula individually so they work for TRUE/FALSE, then put them into an AND.
=A1>C1
=B1<TODAY()
=AND(A1>C1, B1<TODAY())
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use theicon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
?None of us is as good as all of us? - Ray Kroc
?Actually, I *am* a rocket scientist.? - JB (little ones count!)
Just to expand on the above reply:
=IF(AND(Condition1,Condition2),ActionIfTrue,ActionIfFalse)
so for example
=IF(AND(A1>C1,B1<TODAY()),"BothConditionsMet","BothConditionsNotMet")
Many thanks for the response. Unfortunately, I contrusted the formula exactly as suggested, but it didn't work and so resorted to this forum for help.
The example/test I created was to enter value "A" in cell A1 and value "B" in cell B1.
In cell C1, I created the formula: =IF(AND(A1=A,B1=B),"X","Y"), but this resulted in the #NAME? response.
I reckon I must be making a simple mistake somehwere (in the syntax used perhaps?), but can't quite fugure out the problem!
Do you have any suggestions?
Again, many thanks.
Sorry, just realized my mistake! Needed to put the values used in quotes!! It works now.
Many thanks for you help.
If that takes care of your need, please select Thread Tools from menu above and set this topic to SOLVED.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks