AND syntax to distinguish BLANK cells

The Grim Discovery

Board Regular
Joined
Jan 23, 2015
Messages
244
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

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
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,223,227
Messages
6,170,849
Members
452,361
Latest member
d3ad3y3

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