# Calc: Checking whether a range of cells are blank via a formula [closed] I'm trying to create a formula that checks whether a range of cells above it are blank.

Ie, =IF(AND(E21>$C$16, $H$21:H22="");"Here!";"")

gives a #value error. Using F9 I found the error is $H$21:H22="". It works for a single cell, so I assume you can't check a range this way. So how do I do it?

Background: Simple physics spreadsheet. Each row increments a calculation, I want a flag to draw my attention to the spot where the calculation swings from negative to positive. Using =IF(E21>$C$16;"Here!";"") works, but then it has "Here!" on every positive row.
ie,
.
Here!
Here!
Here!
Here!

I would prefer to only have it appear once, on the first row it flips:
.
Here!
.
.
.

edit retag reopen merge delete

### Closed for the following reason the question is answered, right answer was accepted by Alex Kemp close date 2015-11-03 21:14:25.079893

Sort by » oldest newest most voted If you are interested in attracting attention only, then why not take advantage of the conditional formatting? Small demo - Flags to draw attention.ods

more

Why don't you try countif(<range>,"")=counta(<range>)?

more Try this array formula:

=IF(($C$5<e10:e11)*isblank($h$10:h11);"here!";"")< p="">

Introduce with Ctrl+Shift+Enter, the AND() OR() don't work in array formulas.

more

Doesn't work with the range/array in isblank. =IF(ISBLANK(H10);"True";"False") shows True. =IF(ISBlank(H11);"True";"False") also shows true. But =IF(ISBLANK(H10:H11);"True";"False") shows False.

I didn't understand well what Paul451 want.

I hope the next array formula works as wanted.

=IF(($C$16<E21:E41)*($C$16>=E20:E40);"here!";"") (Ctrl+Shift+Enter)

Only shows here!, when the previous cell does not satisfy the condition.

Mariosv, you can't test a range against a conditional (like >= ). You can't use a range with ISBLANK(). So H21="" returns TRUE. H20="" returns TRUE. Even (H20="")*(H21="") returns TRUE. But H20:H21="" returns #VALUE error. How do you test a range/array against another value?

I can't be the first person in spreadsheet history to want to check all the cells in an array/range against a single value? There must be some way to do it. Hi @Paul451,