Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,071
Default CountIf in Even Rows only

Excel 2007
I want to count the number of cells in a range that, say, are over 15, but I
want to consider only cells in even rows.
Also, I need help with counting cells that are, say, 14 to 15. Thanks for
your time. Otto

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,934
Default CountIf in Even Rows only

Try these...

Over 15: =COUNTIF(A:A,"15")

Between and including 14 and 15: =COUNTIF(A:A,"=14")-COUNTIF(A:A,"15")

--
Rick (MVP - Excel)


"Otto Moehrbach" wrote in message
...
Excel 2007
I want to count the number of cells in a range that, say, are over 15, but
I want to consider only cells in even rows.
Also, I need help with counting cells that are, say, 14 to 15. Thanks for
your time. Otto


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,934
Default CountIf in Even Rows only

Sorry, I forgot about the "even rows" condition. Try it this way...

Over 15
=========
=SUMPRODUCT((MOD(ROW(A:A),2)=0)*(A:A15))

Between 14 and 15
===================
=SUMPRODUCT((MOD(ROW(A:A),2)=0)*(A:A=14)*(A:A<=15 ))

--
Rick (MVP - Excel)


"Rick Rothstein" wrote in message
...
Try these...

Over 15: =COUNTIF(A:A,"15")

Between and including 14 and 15: =COUNTIF(A:A,"=14")-COUNTIF(A:A,"15")

--
Rick (MVP - Excel)


"Otto Moehrbach" wrote in message
...
Excel 2007
I want to count the number of cells in a range that, say, are over 15,
but I want to consider only cells in even rows.
Also, I need help with counting cells that are, say, 14 to 15. Thanks for
your time. Otto



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,231
Default CountIf in Even Rows only

"Rick Rothstein" wrote...
Sorry, I forgot about the "even rows" condition. Try it this way...

Over 15
=========
=SUMPRODUCT((MOD(ROW(A:A),2)=0)*(A:A15))

Between 14 and 15
===================
=SUMPRODUCT((MOD(ROW(A:A),2)=0)*(A:A=14)*(A:A<=1 5))


These require Excel 2007. Excel 2003 and prior choke on entire column
references in array formulas.

FWIW, the between 14 and 15 formula on A3:A102 could be calculated
using

=SUMPRODUCT(MOD(ROW(A3:A102)-1,2)*(ABS(A3:A102-14.5)<=0.5))
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,934
Default CountIf in Even Rows only

Sorry, I forgot about the "even rows" condition. Try it this way...

Over 15
=========
=SUMPRODUCT((MOD(ROW(A:A),2)=0)*(A:A15))

Between 14 and 15
===================
=SUMPRODUCT((MOD(ROW(A:A),2)=0)*(A:A=14)*(A:A<= 15))


These require Excel 2007. Excel 2003 and prior choke on entire column
references in array formulas.

FWIW, the between 14 and 15 formula on A3:A102 could be calculated
using

=SUMPRODUCT(MOD(ROW(A3:A102)-1,2)*(ABS(A3:A102-14.5)<=0.5))


The OP said he was using XL2007 in the first line of his post.

--
Rick (MVP - Excel)


  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default CountIf in Even Rows only

This works great for a project I'm working on BUT
how would I calculate some different ones specifically
if the group I was looking for was
less than 14
between 16 & 17
= to or greater than 18

Thanks so much
Bob Reynolds
"Harlan Grove" wrote in message
...
"Rick Rothstein" wrote...
Sorry, I forgot about the "even rows" condition. Try it this way...

Over 15
=========
=SUMPRODUCT((MOD(ROW(A:A),2)=0)*(A:A15))

Between 14 and 15
===================
=SUMPRODUCT((MOD(ROW(A:A),2)=0)*(A:A=14)*(A:A<= 15))


These require Excel 2007. Excel 2003 and prior choke on entire column
references in array formulas.

FWIW, the between 14 and 15 formula on A3:A102 could be calculated
using

=SUMPRODUCT(MOD(ROW(A3:A102)-1,2)*(ABS(A3:A102-14.5)<=0.5))



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
Countif on 2 different rows kd5000 Excel Discussion (Misc queries) 2 October 26th 07 09:18 PM
Countif on 2 different rows kd5000 Excel Discussion (Misc queries) 1 October 26th 07 09:10 PM
COUNTIF in between rows Vasilis Tergen Excel Worksheet Functions 20 January 13th 07 10:22 PM
Countif rows Lauravila Excel Discussion (Misc queries) 2 December 20th 06 04:05 AM
Using COUNTIF with visible rows only Dr Happy Excel Worksheet Functions 2 December 7th 05 03:45 PM


All times are GMT +1. The time now is 02:59 PM.

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"