Remember Me?

#1
August 6th 19, 05:16 PM posted to microsoft.public.excel.programming
 external usenet poster First recorded activity by ExcelBanter: Oct 2008 Posts: 47
IF/AND statement with a Countif included

Hello

I need a formula that can validate a cells contents and also do a count in a range to show me if that range is empty. What is the easiest way?

=if(and((A2="TT",Countif(a5:A8,0),"YES,""))) ....this obviously doesn't work but it is what I am trying to accomplish.

Thanks in advance for any help on how to achieve this

#2
August 6th 19, 05:32 PM posted to microsoft.public.excel.programming
 external usenet poster First recorded activity by ExcelBanter: Apr 2011 Posts: 3,872
IF/AND statement with a Countif included

Hi,

Am Tue, 6 Aug 2019 09:16:41 -0700 (PDT) schrieb Sabosis:

I need a formula that can validate a cells contents and also do a count in a range to show me if that range is empty. What is the easiest way?

=if(and((A2="TT",Countif(a5:A8,0),"YES,""))) ....this obviously doesn't work but it is what I am trying to accomplish.

you put the brackets wrong.
Try:
=IF(AND(A2="TT",COUNTIF(A5:A8,0)),"Yes","")

Regards
Claus B.
--
Windows10
Office 2016
#3
August 6th 19, 06:44 PM posted to microsoft.public.excel.programming
 external usenet poster First recorded activity by ExcelBanter: Oct 2008 Posts: 47
IF/AND statement with a Countif included

On Tuesday, August 6, 2019 at 9:16:45 AM UTC-7, Sabosis wrote:
Hello

I need a formula that can validate a cells contents and also do a count in a range to show me if that range is empty. What is the easiest way?

=if(and((A2="TT",Countif(a5:A8,0),"YES,""))) ....this obviously doesn't work but it is what I am trying to accomplish.

Thanks in advance for any help on how to achieve this

Thanks. I am not getting an error, but I am not seeing a YES for when both conditions match either. I have TT in A2 and blanks in A5:A8. I would want to see YES for these conditions.
#4
August 6th 19, 08:26 PM posted to microsoft.public.excel.programming
 external usenet poster First recorded activity by ExcelBanter: Apr 2011 Posts: 3,872
IF/AND statement with a Countif included

Hi,

Am Tue, 6 Aug 2019 10:44:11 -0700 (PDT) schrieb Sabosis:

Thanks. I am not getting an error, but I am not seeing a YES for when both conditions match either. I have TT in A2 and blanks in A5:A8. I would want to see YES for these conditions.

then try:
=IF(AND(A2="TT",COUNTBLANK(A5:A8)0),"Yes","")
or
=IF(AND(A2="TT",COUNTIF(A5:A8,"")),"Yes","")

Regards
Claus B.
--
Windows10
Office 2016

 Posting Rules Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On

 Similar Threads Thread Thread Starter Forum Replies Last Post Amber Excel Worksheet Functions 2 July 30th 07 06:05 PM italiavb Excel Worksheet Functions 4 July 14th 06 01:57 PM Crazyhorse Excel Discussion (Misc queries) 3 April 10th 06 08:55 PM Steved Excel Worksheet Functions 11 September 28th 05 10:10 PM neeses Excel Worksheet Functions 3 September 21st 05 07:42 PM

All times are GMT +1. The time now is 06:23 PM.