ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Count the number between age ranges (https://www.excelbanter.com/excel-discussion-misc-queries/206071-count-number-between-age-ranges.html)

Nigel

Count the number between age ranges
 
I have a spreadsheet (Replies) which contains ages in column C. I want to be
able to count all those who fall between certain bands/groups i.e. 25 - 34. I
have tried to use the following:
=COUNTIF(Replies!C5:C100,"=25")-COUNTIF(Replies!C5:C100,"<=34")
which I have obtained and modified from othert threads, but I don't get the
answers I expect.

Any help would be appreciated.

Thanks

Mike H

Count the number between age ranges
 
Nigel < should be for the subtraction bit

=COUNTIF(Replies!C5:C100,"=25")-COUNTIF(Replies!C5:C100,"=34")

Mike

"Nigel" wrote:

I have a spreadsheet (Replies) which contains ages in column C. I want to be
able to count all those who fall between certain bands/groups i.e. 25 - 34. I
have tried to use the following:
=COUNTIF(Replies!C5:C100,"=25")-COUNTIF(Replies!C5:C100,"<=34")
which I have obtained and modified from othert threads, but I don't get the
answers I expect.

Any help would be appreciated.

Thanks


Nigel

Count the number between age ranges
 
Mike

Many thanks for your reply, I see what I have done wrong, just the swapping
of the greater and less than signs.

Much appreciated

"Mike H" wrote:

Nigel < should be for the subtraction bit

=COUNTIF(Replies!C5:C100,"=25")-COUNTIF(Replies!C5:C100,"=34")

Mike

"Nigel" wrote:

I have a spreadsheet (Replies) which contains ages in column C. I want to be
able to count all those who fall between certain bands/groups i.e. 25 - 34. I
have tried to use the following:
=COUNTIF(Replies!C5:C100,"=25")-COUNTIF(Replies!C5:C100,"<=34")
which I have obtained and modified from othert threads, but I don't get the
answers I expect.

Any help would be appreciated.

Thanks



All times are GMT +1. The time now is 11:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com