sam
sam

Reputation: 10074

Check if 2 cells are blank excel

Im trying to write a formula that will check if 2 cells in a row are blank and if they are / arnt output true / false. Ive been working with isblank() and have put together this :

=IF(ISBLANK(L2) AND ISBLANK(N2), blank, not blank) but it returns a formula parse error, any ideas why this might be ?

Im doing this inside of google spreadsheets, so ideally id prefer not to use vba.

Upvotes: 3

Views: 11325

Answers (2)

Mark Fitzgerald
Mark Fitzgerald

Reputation: 3068

You're using an AND operator from a language that Excel can't compile.

In Excel it's an AND function with syntax:

AND(logical1, [logical2], ...)

Also the returns, being strings, need to be within double quotes in Excel functions so:

=IF(AND(ISBLANK(L2),ISBLANK(N2)),"blank", "not blank")

Upvotes: 4

steve klein
steve klein

Reputation: 2629

=if(and(isblank(L2),isblank(N2)),"blank","notblank")

Upvotes: 1

Related Questions