A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

I need a fx for counting numbers between numbers (between 18 - 59



 
 
Thread Tools Display Modes
  #1  
Old February 24th, 2009, 02:38 AM posted to microsoft.public.excel.worksheet.functions
Jen
external usenet poster
 
Posts: 544
Default I need a fx for counting numbers between numbers (between 18 - 59

I am trying to have excel count numbers that fall between certain numbers.
I.e. all numbers in column B that range from 18-59 (that include the #18 and
# 59). I have tried the COUNTIF fx but can only do "=18" and "=59" This
ends up counting all numbers above 18 and all numbers below 59. I tried
BETWEEN 18 AND 59 but I obvoiusly don't know the appropiate language. Thanks
in advance. Jen
  #2  
Old February 24th, 2009, 02:48 AM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,759
Default I need a fx for counting numbers between numbers (between 18 - 59

Try this:

=COUNTIF(B:B,"=18")-COUNTIF(B:B,"59")

Better to use cells to hold the boundary values:

D1 = 18
E1 = 59

=COUNTIF(B:B,"="&D1)-COUNTIF(B:B,""&E1)

--
Biff
Microsoft Excel MVP


"Jen" wrote in message
...
I am trying to have excel count numbers that fall between certain numbers.
I.e. all numbers in column B that range from 18-59 (that include the #18
and
# 59). I have tried the COUNTIF fx but can only do "=18" and "=59" This
ends up counting all numbers above 18 and all numbers below 59. I tried
BETWEEN 18 AND 59 but I obvoiusly don't know the appropiate language.
Thanks
in advance. Jen



  #3  
Old February 24th, 2009, 05:54 AM posted to microsoft.public.excel.worksheet.functions
Shane Devenshire[_3_]
external usenet poster
 
Posts: 3,333
Default I need a fx for counting numbers between numbers (between 18 - 59

Hi,

Personally I like =COUNTBETWEEN(18,59) Just kidding, I've asked Microsoft
for a between function but no luck yet.

In 2003:

=SUMPRODUCT(B1:B100=18)*(B1:B100=59))

In 2007:

=COUNTIFS(B1:B100,"=18",B1:B100,"=59")

or you can replace the 18 and 59 with cell references, suppose A1 and A2

=COUNTIFS(B1:B100,"="&A1,B1:B100,"="&A2)

--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"Jen" wrote:

I am trying to have excel count numbers that fall between certain numbers.
I.e. all numbers in column B that range from 18-59 (that include the #18 and
# 59). I have tried the COUNTIF fx but can only do "=18" and "=59" This
ends up counting all numbers above 18 and all numbers below 59. I tried
BETWEEN 18 AND 59 but I obvoiusly don't know the appropiate language. Thanks
in advance. Jen

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:07 AM.


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