Google Sheets Error Message – How to Create Error Message for Empty Cells

google sheets

I've been messing around with a spreadsheet for a while now and got it mostly working besides one part.

I have two columns, if a cell in the first column is "1", but the cell in the same row but different column is "empty" I want to output an error message.

I can do that for a single set of cells very easily with an IF, like so

=IF(J35 = 1,IF(ISBLANK(K35) = TRUE,"error","ok"),"ok")

But I have around 165 rows that I'd need to check that for.

Does anyone know how I could achieve this?

enter image description here

(The 1's and 0's are tickboxes in my actual table, ticked = 1, unticked = 0)

Best Answer

The use of the ARRAYFORMULA is what you need.
Please try the following formula instead
(Note adjust the ranges J3:J11 and K3:K11 to your needs and since you have tick-boxes change 1 to TRUE)

=ArrayFormula(IF(J3:J11 = TRUE,IF(ISBLANK(K3:K11) = TRUE,"error","ok"),"ok"))

Please read more about ARRAYFORMULA