AND syntax to distinguish BLANK cells

The Grim Discovery

Board Regular
Joined
Jan 23, 2015
Messages
241
Office Version
  1. 365
Platform
  1. Windows
Excelites

I'm using formula to state whether or not A3:D3 are each populated with a 'yes'.

IF(AND(A3="yes",B3="yes",C3="yes",D3="yes"),"yes","no")

But I cant work out how to write the formula so that if all of those cells are blanks then the formula should produce a blank. Would appreciate your guidance.

Thanks in advance
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Hey!

You can do it via nesting an ISBLANK function into your current formula, so it'll look like this:

IF(AND(ISBLANK(A3),ISBLANK(B3),ISBLANK(C3),ISBLANK(D3)),"",IF(B4=TRUE,"",IF(AND(A3="yes",B3="yes",C3="yes",D3="yes"),"yes","no")))

A bit messy but it should do the trick!

Kind regards,
Matt
 
Upvote 0
Sorry, I left in part of the formula that's not needed, try this instead:

IF(AND(ISBLANK(A3),ISBLANK(B3),ISBLANK(C3),ISBLANK(D3)),"",IF(AND(A3="yes",B3="yes",C3="yes",D3="yes"),"yes","no"))
 
Upvote 0
Excelites

I'm using formula to state whether or not A3:D3 are each populated with a 'yes'.

IF(AND(A3="yes",B3="yes",C3="yes",D3="yes"),"yes","no")

But I cant work out how to write the formula so that if all of those cells are blanks then the formula should produce a blank. Would appreciate your guidance.

Thanks in advance

try

=IF(COUNTIF(A3:D3,"")=4,"","?")

fill in the ? when not all 4 are blank
 
Upvote 0
Hi,

Try this:

=IF(COUNTIF(A3:D3,"Yes")=4,"Yes",IF(COUNTIF(A3:D3,"")=4,"","No"))
 
Upvote 0

Forum statistics

Threads
1,215,352
Messages
6,124,455
Members
449,161
Latest member
NHOJ

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top