• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Help with If/AND/OR

Effendi

New Member
Hello,

I am new to using formulas and struggling to get this right.

I've attached a file to illustrate the True condition I'm trying to achieve with my IF statement.

I'm ok using IF statements alone, however, I've a feeling this requires a combination.

Hope I was clear in my explanation and workbook example.

Thanks.
Effendi


Condition for True

C2=Unapproved and D2=100
OR
C2=Unapproved and B2<Today
OR
C2=Approved and D2<100
 

Attachments

  • Book5.xls
    28.5 KB · Views: 6
Will this work?

=IF(OR(AND($C2="Unapproved",$D2=100),AND($C2="Unapproved",$B2=TODAY()),AND($C2="Approved",$D2<100)),TRUE,FALSE)

See attached for reference.

If you just want TRUE/FALSE as your outputs, you actually don't need the IF at all...this will return the same results:

=OR(AND($C7="Unapproved",$D7=100),AND($C7="Unapproved",$B7=TODAY()),AND($C7="Approved",$D7<100))
 

Attachments

  • effendi1.xls
    28 KB · Views: 15
Eibi, Those are clean solutions I can follow but I'm confused about your reasoning in one place: both your solutions use the condition "$B2=Today()" when Effendi referred to "B2<Today" being the condition required with "unapproved" for a true result. Was there a reason for the change or was that just something overlooked/a typo?
 
Many thanks Eibi! It works, just changed the date operator to < and all conditions are met.

Thank you so much!

Best.

Effendi
 
Back
Top