#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 454
Default CountIf Q

Can the formula below work, I get a #Value! returned so I assume I
have a syntax wrong. Tried entering as an Array, but still the same. I
know =COUNTIF(C12:C14,"Yes") works but I want to skip C13

=COUNTIF((C12,C14),"Yes")
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default CountIf Q

On Wed, 6 Feb 2008 03:56:32 -0800 (PST), Sean wrote:

Can the formula below work, I get a #Value! returned so I assume I
have a syntax wrong. Tried entering as an Array, but still the same. I
know =COUNTIF(C12:C14,"Yes") works but I want to skip C13

=COUNTIF((C12,C14),"Yes")


=(C12="Yes")+(C14="yes")


--ron
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default CountIf Q

Hi,

Try this

=COUNTIF(C12,"Yes")+COUNTIF(C14,"Yes")
Mike

"Sean" wrote:

Can the formula below work, I get a #Value! returned so I assume I
have a syntax wrong. Tried entering as an Array, but still the same. I
know =COUNTIF(C12:C14,"Yes") works but I want to skip C13

=COUNTIF((C12,C14),"Yes")

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 454
Default CountIf Q

Thanks Ron, knew it was simple

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default CountIf Q

On Wed, 6 Feb 2008 04:48:02 -0800 (PST), Sean wrote:

Thanks Ron, knew it was simple


You're welcome. Seems COUNTIF won't take a non-contiguous range as an
argument. So you could do several COUNTIF's, but it seems simpler to just add
the equalities as Excel will automagically convert those to a 1 or 0 depending
on the result being TRUE or FALSE.

If you had several multi-cell discontiguous ranges, (as opposed to just two
cells), then serial COUNTIF's might be more efficient. eg:

=COUNTIF(A1:A10,"YES") + COUNTIF(C8:D10,"YES")


--ron


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default CountIf Q

It can be 'persuaded'

=SUMPRODUCT(--COUNTIF(INDIRECT({"C12","C14"}),"Yes"))

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Ron Rosenfeld" wrote in message
...
On Wed, 6 Feb 2008 04:48:02 -0800 (PST), Sean
wrote:

Thanks Ron, knew it was simple


You're welcome. Seems COUNTIF won't take a non-contiguous range as an
argument. So you could do several COUNTIF's, but it seems simpler to just
add
the equalities as Excel will automagically convert those to a 1 or 0
depending
on the result being TRUE or FALSE.

If you had several multi-cell discontiguous ranges, (as opposed to just
two
cells), then serial COUNTIF's might be more efficient. eg:

=COUNTIF(A1:A10,"YES") + COUNTIF(C8:D10,"YES")


--ron



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default CountIf Q

Or

=SUM(COUNTIF(INDIRECT({"C12","C14"}),"Yes"))


"Bob Phillips" wrote:

It can be 'persuaded'

=SUMPRODUCT(--COUNTIF(INDIRECT({"C12","C14"}),"Yes"))

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Ron Rosenfeld" wrote in message
...
On Wed, 6 Feb 2008 04:48:02 -0800 (PST), Sean
wrote:

Thanks Ron, knew it was simple


You're welcome. Seems COUNTIF won't take a non-contiguous range as an
argument. So you could do several COUNTIF's, but it seems simpler to just
add
the equalities as Excel will automagically convert those to a 1 or 0
depending
on the result being TRUE or FALSE.

If you had several multi-cell discontiguous ranges, (as opposed to just
two
cells), then serial COUNTIF's might be more efficient. eg:

=COUNTIF(A1:A10,"YES") + COUNTIF(C8:D10,"YES")


--ron




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I use a countif function according to two other countif fu. Kirsty Excel Worksheet Functions 2 February 20th 06 11:44 AM
Countif in VBA xxbenxx Excel Worksheet Functions 1 February 2nd 06 12:01 PM
edit this =COUNTIF(A1:F16,"*1-2*")+COUNTIF(A1:F16,"*2-1*") sctroy Excel Discussion (Misc queries) 2 September 25th 05 04:13 AM
COUNTIF or not to COUNTIF on a range in another sheet Ellie Excel Worksheet Functions 4 September 15th 05 10:06 PM
COUNTIF in one colum then COUNTIF in another...??? JonnieP Excel Worksheet Functions 3 February 22nd 05 02:55 PM


All times are GMT +1. The time now is 08:39 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"