I need to write an IIF statement that does the following ….
IF O9, Q9 and R9 ARE THE SAME and if H9 =>5/15/14 and <09/30/14 then show "1" else show "2"
any assistance appreciated. I cant seem to get the syntax right.
1 comment
-
Jet Reports Historic Posts Probably this is more a question for the Excel tips, but I believe I have found your formula:
=IF(AND(O9=Q9,O9=R9,H9>=DATE(2014,5,15),H9<DATE(2014,9,30)),1,2)
The AND statement can handle multiple matches, and will only result in a TRUE response for the IF statement if all arguments are true.
If you want to be completely thorough, you could add in a Q9=R9 to the AND statement, but I don't see that as necessary (logically if O9 is a match to both Q9 and R9, then they are a match to one another).
I hard-coded the dates into the formula using DATE statements, but my advice would be to make those cell references instead.