Is it posibble to have If(Isblank) return a yes, no, NA?

ColA will have a date or NA. ColB will have a date. I would like Col C to be blank if ColA is blank, =Yes if ColB is <=ColA, =No if ColB is >ColA, and NA if ColA is NA
Is this possible??
I get this far, but not sure how to autmate the NA
=IF(ISBLANK([ColA]@row), "", IF([ColA]@row <= [ColB]@row, "yes", "no"))
Best Answer
-
Hey @north
Since your ColA isn't a date only column, the formula needs to verify that dates are in the cell in order to 'do the math' of less than or greater. Try the formula below:
=IF(AND(ISDATE(ColA@row), ISDATE(ColB@row), ColB@row <= ColA@row), "Yes", IF(AND(ISDATE(ColA@row), ISDATE(ColB@row), ColB@row > ColA@row), "No", IF(ColA@row = "NA", "NA")))
Will this work for you?
Kelly
Answers
-
Hey @north
Since your ColA isn't a date only column, the formula needs to verify that dates are in the cell in order to 'do the math' of less than or greater. Try the formula below:
=IF(AND(ISDATE(ColA@row), ISDATE(ColB@row), ColB@row <= ColA@row), "Yes", IF(AND(ISDATE(ColA@row), ISDATE(ColB@row), ColB@row > ColA@row), "No", IF(ColA@row = "NA", "NA")))
Will this work for you?
Kelly
-
That did the trick thank you!
Help Article Resources
Categories
Check out the Formula Handbook template!