Forum Discussion
RD0101160
Mar 15, 2024Copper Contributor
Combining IF, And, Or and ignoring blanks
Hi, I need some help!! I have managed to combine IF and Or together to do what I need it to do, but I can't seem to get it to ignore blanks. The 'or' options are mainly if a cell is <90, but it in...
Rodrigo_
Mar 16, 2024Iron Contributor
=IF(OR(ISBLANK(N2), I2<90, M2<90, K2<90, D2<90), "Yes", "No")
or
=IF(AND(NOT(ISBLANK(N2)), I2<90, M2<90, K2<90, D2<90), "Yes", "No")
or
=IF(AND(NOT(ISBLANK(N2)), I2<90, M2<90, K2<90, D2<90), "Yes", "No")
- RD0101160Mar 16, 2024Copper ContributorI've just tried it and that hasn't worked 😞
So I need it to return yes if either I2, M2, K2 or D2 are less than 90 but not blank, or, if N2 has anything in it
I've tried adding >1<90 for each of I M K and D but that didn't seem to work either 😞- HansVogelaarMar 16, 2024MVP
Try
=IF(OR(N2<>"", AND(I2<>"", I2<90), AND(M2<>"", M2<90), AND(K2<>"", K2<90), AND(D2<>"", D2<90)), "Yes", "No")
- RD0101160Mar 16, 2024Copper ContributorI've managed to do it now embedding IF functions so not needed to use OR AND so have done
IF (N2<>"", "Yes", IF(I2<1, "No", IF(I2, <90, "Yes", IF(M2<1, "No, IF(M2<90, "Yes" and then carrying on like that and it seems to have done the trick! Yay!
- RD0101160Mar 16, 2024Copper Contributor
Rodrigo_ thanks so much for you reply! It is the multiple cells that I need to ignore if blank as N2 is already only counted if it has text in, so it is I2, M2,K2 and D2 I need to only count if they aren't blank - I will try swapping them in and see if it works - fingers crossed!! Thanks again.