 # Excel formula

Hi
I want to thank the excel community for helping me try to understand complex formulas. I have another formula and may have a few more in the upcoming weeks.
=IF(AND(N3=1,P3=0),IF(AND(R3>=E3-90,R3<=F3),R3),IF(AND(R3>=E3,R3<=F3),R3,IF(AJ3=1,R3,"NA)))

Am I correct in saying that this is how the formula is read . IF N3=1 AND P3=0 AND R3>=E3-90,R3<=F3 then value is R3. If that criteria is not met it looks to see IF R3>=E3,R3<=F3. If that criteria is met its R3. If not met it will look for IF AJ3=1 if criteria is met R3, if not NA
4 Replies

# Re: Excel formula

If you’re looking to ask a question or start a conversation about Excel, you’re in the right place!

Welcome to your Excel discussion space!

Thank you for your understanding and patience

Nikolino

I know I don't know anything (Socrates)

# Re: Excel formula

I don't think the formula is correct. There is no " after NA, and the formula returns FALSE in several situations. Perhaps it should be

=IF(AND(N3=1,P3=0),IF(AND(R3>=E3-90,R3<=F3),R3,IF(AND(R3>=E3,R3<=F3),R3,IF(AJ3=1,R3,"NA"))),"NA")

but of course I don't know what the person who wrote it intended.

# Re: Excel formula

But was my translation of the original formula correct?

# Re: Excel formula

With the exception of the missing " on the NA which would cause errors I believe your interpretation of the formula to be correct. So the following might be an alternative:
=IF(OR( AND(N3=1,P3=0,R3>=E3-90,R3<=F3),AND(R3>=E3,R3<=F3),AJ3=1),R3,"NA")