Forum Discussion
LesKing
Jun 26, 2023Brass Contributor
Problems with if/and/or type multiple/nested conditions.
I’m still having problems with if/and/or type multiple/nested conditions. Can anyone help please with the following. I need a single formula which meets the conditions below: If J2 = “Mandatory” ...
LesKing
Jun 26, 2023Brass Contributor
Hi Sergei,
Thank you so much, that works perfectly. I hadn't realised about using the * so I've still got a whole lot to learn!
Thanks again, Les King
Thank you so much, that works perfectly. I hadn't realised about using the * so I've still got a whole lot to learn!
Thanks again, Les King
mtarler
Jun 26, 2023Silver Contributor
LesKing alternatively this is also nearly literal but instead of separate IF conditions for ="" vs <>"", this uses a single IF
=IF( J2 = "Mandatory", IF (W2="", "Needed", W2+1095),
IF( J2 = "Ideally", IF(W2="", "Ideally", W2+1095),
IF( J2 = "Not Required", IF(W2="", "Not Required", "Not Required")
)))another option is SWITCH:
=SWITCH(J2, "Mandatory", IF (W2="", "Needed", W2+1095),
"Ideally", IF(W2="", "Ideally", W2+1095),
"Not Required", IF(W2="", "Not Required", "Not Required"),
"not found")so SWITCH is useful when doing multiple comparisons on the same cell/value. The last output is if none of those 3 options are in J2.
- LesKingJun 26, 2023Brass ContributorHi,
Your solutions look good, and I will try that later and let you know how I get on. I must admit I was not aware of the SWITCH function - it really is a steep learning curve - I'm glad there are people like you at the top of the curve to help those of us crawling around near the very bottom of the curve!!!