Google-sheets – How to make sure an equation doesn’t give an answer if more than one cell is blank

formulasgoogle sheetsgoogle-sheets-arrayformula

I have half the equation working:

=IF(AND(IF(NOT(ISBLANK(AG22)),TRUE,FALSE),AJ22<AG22),"1","0")

So it looks like this:

What I WANT it to do, is to only prompt an increase or decrease response if BOTH 90 and 180 days contain text. Right now, if 90 days is filled out but 180 is not, it gives a decrease. It shouldn't give any response unless 90 and 180 are BOTH filled out. So how do I nest another is not blank in there? Because it already stops it from answering if the row for 90 days is blank, but doesn't ALSO for 180. Does that make sense?

Here's a visual:

enter image description here

Help, please!

Best Answer

You can ask Sheets if both of the cells are not blank this way:

=IF(AND(NOT(ISBLANK(A2)),NOT(ISBLANK(B2))), "here","not here")

enter image description here