Forum Discussion
Jenstarzie
Jun 12, 2025Copper Contributor
Stringing together formula in Excel to create one formula that looks at multiple factors
Hi,
I am trying to write a formula that returns a YES or NO in one cell, based on several different sets of criteria for values in 2 other cells.
I know how to write the formula for each different set of criteria, but i cannot work out how to string them all together so that all are considered for the YES/NO result.
I have tried multiple ways of putting them together and it's just going way over my head and past my formula knowledge so would really appreciate some help in how to do it. (I've never managed to get my head around more complex OR functions which is what i think is needed here?)
I have listed the separate formulas below:
=AND(D10>=1, D10<=31, E10="Days NET") – YES
or
=AND(D10<=30, E10="Days after receipt") – YES
or
=AND(D10<=30, E10="Days after EOM") – YES
or
=AND(D10>=29, E10="Days after EOM") - NO
or
=AND(D$0>=29, E10="Days after receipt") - NO
or
=IF(D10>=30) - no
In explanation:
If the value in D10=30 AND the value in E10='Days NET', OR the value in D10 is less than 30 (regardless of value in E10), result is YES.
Or If the value in D10=30 AND the value in E10 is 'Days after EOM' or 'DAYS after receipt', result is NO
If the value in D10 is over 30, result is always NO (regardless of value in E10).
D10 is an empty cell that can have any 2 digit number entered.
E10 is a drop down list of 3 options only (Days NET, Days after EOM or Days after Receipt)
Result formula is going in cell H10.
I would really appreciate any guidance on how to create this formula.
Thanks in advance!
2 Replies
Sort By
- m_tarlerBronze Contributor
First off, your formulas and your TEXT do NOT agree. For example:
If the value in D10=30 AND the value in E10='Days NET', OR the value in D10 is less than 30 (regardless of value in E10), result is YES.
I'm pretty sure is supposed to explain the first 3 equations:
=AND(D10>=1, D10<=31, E10="Days NET") – YES
or
=AND(D10<=30, E10="Days after receipt") – YES
or
=AND(D10<=30, E10="Days after EOM") – YES
BUT the equation says If D10 is between 0 and 32 (or 1 and 31 inclusive) and E10 is "Days NET" OR D10 is less than 31 (or less than or equal to 30) and E10 is either "Days after receipt" or "Days after EOM" then result is YES. This means if D10 is 31 (not 30) and "Days NET" , OR if D10<=30 then YES UNLESS D10 is 0 or less and "Days NET" then it would be NO.
So HansVogelaar gave a solution based on your equations but based on your TEXT I think you want:
=IF( OR(D10<30, AND(D10=30, E10="Days NET") ), "YES", "NO")
or alternatively:
=IF( (D10<30)+(D10=30)*(E10="Days NET"), "YES", "NO")
Try
=IF(OR(AND(D10>=1, D10<=31, E10="Days NET"), AND(D10<=30, OR(E10={"Days after receipt","Days after EOM"}))), "YES", "NO")