Search code examples
excelif-statementcountexcel-formulanotnull

excel formula: return true if none of the cells in the range are blank


I want to return true if a range of cells (A2:K2) doesnt contain any blanks. So all the cells in the given range must contain something.

I can count the number of cells that contains something but im not sure what to do next?

=SUMPRODUCT((LEN(A2:K2)>0)*1)

Solution

  • Use COUNTBLANK to count the blank cells in conjunction with an IF formula:

    =IF(COUNTBLANK(A2:K2)=0,TRUE,FALSE)