Forum Discussion
Usfhotchris
Jan 18, 2023Copper Contributor
Excel if/then formulas
I have a situation i cannot find a formula or help for.
Here goes:
If cell N2=S, then run P2-H2, and if that value is >14, Return "N"
If cell N2=E, the. Run P2-H2, and if that value is >3, return "N"
So, if N2=S run the top formula i gave, and if greater than 14, return N. If equal to or less than, return Y
If N2=E, run the secind formula provided, and if greater than 3, return N. If equal to or less tham, return Y
=IF(OR(AND(N2="S",P2-H2>14),AND(N2="E",P2-H2>3)),"N",IF(OR(AND(N2="S",P2-H2<=14),AND(N2="E",P2-H2<=3)),"Y",""))
You can try this nested IF formula.
9 Replies
- OliverScheurichGold Contributor
=IF(OR(AND(N2="S",P2-H2>14),AND(N2="E",P2-H2>3)),"N",IF(OR(AND(N2="S",P2-H2<=14),AND(N2="E",P2-H2<=3)),"Y",""))
You can try this nested IF formula.
- UsfhotchrisCopper Contributor
One more question....
Hope so i wrote a formula for of any cells Z3-AE3 are N, return N in cell AF3??
- OliverScheurichGold Contributor
- UsfhotchrisCopper Contributor
It worked! Thank you! I was 3 days trying to figure that out! I may have another one at o work through this excel!!!