Konstanze
Konstanze

Reputation: 1

Google Sheets: compare cells and return TRUE/FALSE only if they are not blank

This is my first question on stackoverflow.

I would like to compare two columns of data on Google Sheets and receive a TRUE/FALSE response (=A1=B1) when A1 and B1 are not blank. The simple formula =A1=B1 gives a TRUE response when comparing two blank cells and a FALSE response if only one of them is blank. My issue is that I would like to receive:

I tried with the IF and IFS functions and not(isblank() but I got only error messages so far.

Would it be possible to achieve this on Google Sheets?

Many thanks in advance!

Upvotes: 0

Views: 1959

Answers (1)

Timmy Chan
Timmy Chan

Reputation: 985

Just simply nest multiple IF expressions. Use COUNTBLANK to get number of blank cells.

Use the following formula:

=IF(COUNTBLANK(A1:B1)=0, A1=B1, IF(COUNTBLANK(A1:B1)=1, "condition4", "condition3"))

Upvotes: 1

Related Questions