Forum Discussion
If functions with but and or nested
Assuming I understood, what about?
=IFS(
AND(C25 > 3000, C21 > 5), "green",
OR(C25 >= 1000, C21 > 3), "blue",
OR(C25 >= 500, C21 > 1), "red",
TRUE, "pink"
)
- rpruittJan 08, 2023Copper Contributor
I think the issue is how your question is set up to begin with, rather than the equation.
Your equation states that
- If C25>300 AND C21>5, then the answer is green
- If C25>1000 OR C21>3, then the answer is blue
- If C>500 OR C21>1, then the answer is red
- If none of those conditions are met, then the answer will be pinkIt will never be green, because the blue conditions are always met. The only answers you will ever get are pink, red or blue.
=IF(AND(C25>3000,C21>6),"green",IF(OR(C25>1000,C21>3),"blue",IF(OR(C25>500,C21>1),"red","pink"))) - FreePilotJan 08, 2023Copper ContributorI'm sorry. It didn't work.
- LorenzoJan 08, 2023Silver Contributor
I'm afraid I don't understand. TBH I have a very hard time to figure out what you exactly mean with:
C25>=1000 and/or C21>3
C25>=500 and/or C21>1That might be me though... Let's see if someone else undertand & feel free to clarify your thoughts in the meantime
- FreePilotJan 09, 2023Copper ContributorEveryone. I figured it out. I'm so excited. I was dreaming it lastnight. Just now I just got on my computer and just started typing it out. IT WORKS!!!!!
Here it is.
=IF(AND(C25>3000,C21>5),"VFR",IF(AND(OR(C25>=1000),(C21>=3)),"MVFR",IF(AND(OR(C25>=500),(C21>=1)),"IFR","LIFR")))