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,...
- Jan 18, 2023
=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
Jan 18, 2023Copper Contributor
One more question....
Hope so i wrote a formula for of any cells Z3-AE3 are N, return N in cell AF3??
OliverScheurich
Jan 18, 2023Gold Contributor
- UsfhotchrisJan 19, 2023Copper ContributorThis one is not working. Where did the 6 come from in your equation?
- OliverScheurichJan 19, 2023Gold Contributor
If all 6 cells Z3-AE3 have "N" then the result of the suggested COUNTIF formula is 6. Maybe i didn't understand what you want to do.
Or do you want only one of the cells Z3-AE3 with "N"? If so you can try this formula.
=IF(COUNTIF(Z3:AE3,"N")=1,"N","")
- UsfhotchrisJan 19, 2023Copper ContributorHmmmm.... also not working. But.. you have been a GODSEND!!!
I'm trying to say:
If any cells Z3-AE3 contain an N, return an N in cell AF3. IF all of those cells are Y, return Y