New Excel Forum

This forum has been moved to TeachExcel.com

Ask all future questions in the New Excel Forum.

ExcelKey

IF AND Statement

Formulas, Functions, Formatting, Charts, Data Analysis, etc.

IF AND Statement

Postby JABJC01 » Fri Jan 29, 2016 12:40 pm

Looking for a little help with my If Statement. I’m not getting the intended results. Here’s my formula:

=IF(AND(A1<>"",B1="",C1="",D1="",E1="",F1="",),"No","Yes")

Here’s what I’m trying to accomplish. If cell A1 is not blank and cells B1 thru F1 are blank; I want cell G1’s value to be No. If cell A1 is not blank and any of the cells B1 thru F1 are not blank either; then I want cell G1’s value to be Yes. My formula all returns a “yes” value.

Thank you
  • 0

JABJC01
Rookie
 
Posts: 10
Joined: Sep 4, 2015
Reputation: 0
Excel Version: 2010

Re: IF AND Statement

Postby Kevin UK » Fri Jan 29, 2016 1:10 pm

Hi

How about

=IF(AND(A1<>"",COUNT(B1:F1)=0),"No","Yes")
  • 1

Regards

Kevin
Kevin UK
Excel Master
 
Posts: 568
Joined: Jun 24, 2012
Reputation: 86
Excel Version: 2016

Re: IF AND Statement

Postby JABJC01 » Fri Jan 29, 2016 1:24 pm

Kevin,

Thank you. That's perfect!
  • 0

JABJC01
Rookie
 
Posts: 10
Joined: Sep 4, 2015
Reputation: 0
Excel Version: 2010


Return to General Excel Questions

Who is online

Users browsing this forum: No registered users and 115 guests