Forum Discussion

Usfhotchris's avatar
Usfhotchris
Copper Contributor
Jan 18, 2023
Solved

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

 

 

  • Usfhotchris 

    =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

  • Usfhotchris 

    =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.

     

     

    • Usfhotchris's avatar
      Usfhotchris
      Copper Contributor

      OliverScheurich 

       

      It worked!  Thank you!  I was 3 days trying to figure that out!  I may have another one at o work through this excel!!!

Resources