#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
FHE
 
Posts: n/a
Default countif

I would like to use the CountIf statement but applied to a set of separated
cells, rather then a range.

like countif((a1;a3;a5;a7);1).

However I get a 'value' error on this.

Anythoughts?

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Peo Sjoblom
 
Posts: n/a
Default countif

Not possible, you need to use either multiple countifs, or if your
cells always are a1, a3, a5 and so on (every other cell) you can use

=SUMPRODUCT(--(A1:A150=1);--(MOD(ROW(A1:A150);2)=1))

will count 1 in a1, a3, a5, a7 etc


--

Regards,

Peo Sjoblom


"FHE" wrote in message
...
I would like to use the CountIf statement but applied to a set of

separated
cells, rather then a range.

like countif((a1;a3;a5;a7);1).

However I get a 'value' error on this.

Anythoughts?



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Elkar
 
Posts: n/a
Default countif

Try this:

=SUMPRODUCT(--(MOD(ROW(A1:A10),2)<0),--(A1:A10=1))

This will count only odd numbered rows in the range A1 thru A10 that have a
value of 1.

HTH
Elkar

"FHE" wrote:

I would like to use the CountIf statement but applied to a set of separated
cells, rather then a range.

like countif((a1;a3;a5;a7);1).

However I get a 'value' error on this.

Anythoughts?

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
FHE
 
Posts: n/a
Default countif

Thanks a lot to both of you.
Bit of a bummer really, as the cells I need to 'countif' are not needly and
evenly distributed.

Lets see if I can be creative with your solution though...

Thanks again!

Gr Frank

"Peo Sjoblom" wrote:

Not possible, you need to use either multiple countifs, or if your
cells always are a1, a3, a5 and so on (every other cell) you can use

=SUMPRODUCT(--(A1:A150=1);--(MOD(ROW(A1:A150);2)=1))

will count 1 in a1, a3, a5, a7 etc


--

Regards,

Peo Sjoblom


"FHE" wrote in message
...
I would like to use the CountIf statement but applied to a set of

separated
cells, rather then a range.

like countif((a1;a3;a5;a7);1).

However I get a 'value' error on this.

Anythoughts?




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
Formula format for Count or Countif funtion with two criterias Debi Excel Worksheet Functions 2 September 26th 05 08:23 PM
COUNTIF or not to COUNTIF on a range in another sheet Ellie Excel Worksheet Functions 4 September 15th 05 10:06 PM
COUNTIF COMBINATION?? Heather Excel Worksheet Functions 1 April 26th 05 02:44 AM
Combining IF and COUNTIF based on two columns maxtrixx Excel Discussion (Misc queries) 5 March 31st 05 06:21 PM
Countif - Countif maswinney Excel Worksheet Functions 3 November 15th 04 11:06 PM


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

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

About Us

"It's about Microsoft Excel"