#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 53
Default Counting # of cells

I need a formula to count the number of cells in a column that contain the
numbers between 120 and 129. Thanks for any input!
--
Ronnie
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,393
Default Counting # of cells

=COUNTIF(A1:A100, "=120") - COUNTIF(A1:A100, "<=129")
or
=SUMPRODUCT(--(A1:A100=120),--(A1:A100<=129))
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Ronnie" wrote in message
...
I need a formula to count the number of cells in a column that contain the
numbers between 120 and 129. Thanks for any input!
--
Ronnie



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,358
Default Counting # of cells

I think you mistyped on your COUNTIF
I believe it should be:
=COUNTIF(A1:A100, "=120") - COUNTIF(A1:A100, "129")
--
** John C **


"Bernard Liengme" wrote:

=COUNTIF(A1:A100, "=120") - COUNTIF(A1:A100, "<=129")
or
=SUMPRODUCT(--(A1:A100=120),--(A1:A100<=129))
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Ronnie" wrote in message
...
I need a formula to count the number of cells in a column that contain the
numbers between 120 and 129. Thanks for any input!
--
Ronnie




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 53
Default Counting # of cells

The sumproduct formulat worked. THANKS!!
--
Ronnie


"Bernard Liengme" wrote:

=COUNTIF(A1:A100, "=120") - COUNTIF(A1:A100, "<=129")
or
=SUMPRODUCT(--(A1:A100=120),--(A1:A100<=129))
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"Ronnie" wrote in message
...
I need a formula to count the number of cells in a column that contain the
numbers between 120 and 129. Thanks for any input!
--
Ronnie




  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Counting # of cells

the column being 'A', it could be written this way:

=COUNTIF(A:A,"<130")-COUNTIF(A:A,"<120")

"Ronnie" wrote:

I need a formula to count the number of cells in a column that contain the
numbers between 120 and 129. Thanks for any input!
--
Ronnie



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 53
Default Counting # of cells

I am so close, but it's not working. I think it's the minus sign in the
formula. Any other suggestions.
--
Ronnie


"Ryan Martin" wrote:

the column being 'A', it could be written this way:

=COUNTIF(A:A,"<130")-COUNTIF(A:A,"<120")

"Ronnie" wrote:

I need a formula to count the number of cells in a column that contain the
numbers between 120 and 129. Thanks for any input!
--
Ronnie

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Counting # of cells

What makes you think that the minus sign is wrong? The formula gives the
right result if the values are integer and the "between" is intended to be
inclusive.
It would be better to use =COUNTIF(A:A,"<=129")-COUNTIF(A:A,"<120") in case
the numbers are not necessarily integer.
Change it to =COUNTIF(A:A,"<129")-COUNTIF(A:A,"<=120") if "between" is
intended to be exclusive, not inclusive.
--
David Biddulph

"Ronnie" wrote in message
...
I am so close, but it's not working. I think it's the minus sign in the
formula. Any other suggestions.
--
Ronnie


"Ryan Martin" wrote:

the column being 'A', it could be written this way:

=COUNTIF(A:A,"<130")-COUNTIF(A:A,"<120")

"Ronnie" wrote:

I need a formula to count the number of cells in a column that contain
the
numbers between 120 and 129. Thanks for any input!
--
Ronnie



  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 53
Default Counting # of cells

I'm not sure what was wrong. I was unable to get the counts to come out
properly. I did get the "sumproduct" formula to work. I would like to know
why the other formula was not working, but it wasn't.
--
Ronnie


"David Biddulph" wrote:

What makes you think that the minus sign is wrong? The formula gives the
right result if the values are integer and the "between" is intended to be
inclusive.
It would be better to use =COUNTIF(A:A,"<=129")-COUNTIF(A:A,"<120") in case
the numbers are not necessarily integer.
Change it to =COUNTIF(A:A,"<129")-COUNTIF(A:A,"<=120") if "between" is
intended to be exclusive, not inclusive.
--
David Biddulph

"Ronnie" wrote in message
...
I am so close, but it's not working. I think it's the minus sign in the
formula. Any other suggestions.
--
Ronnie


"Ryan Martin" wrote:

the column being 'A', it could be written this way:

=COUNTIF(A:A,"<130")-COUNTIF(A:A,"<120")

"Ronnie" wrote:

I need a formula to count the number of cells in a column that contain
the
numbers between 120 and 129. Thanks for any input!
--
Ronnie




  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Counting # of cells

We may need a bit more information than "was not working".
What values did you have in the cells, which formula were you using, what
answer did you get, and what answer did you expect?
--
David Biddulph

"Ronnie" wrote in message
...
I'm not sure what was wrong. I was unable to get the counts to come out
properly. I did get the "sumproduct" formula to work. I would like to
know
why the other formula was not working, but it wasn't.
--
Ronnie


"David Biddulph" wrote:

What makes you think that the minus sign is wrong? The formula gives the
right result if the values are integer and the "between" is intended to
be
inclusive.
It would be better to use =COUNTIF(A:A,"<=129")-COUNTIF(A:A,"<120") in
case
the numbers are not necessarily integer.
Change it to =COUNTIF(A:A,"<129")-COUNTIF(A:A,"<=120") if "between" is
intended to be exclusive, not inclusive.
--
David Biddulph

"Ronnie" wrote in message
...
I am so close, but it's not working. I think it's the minus sign in the
formula. Any other suggestions.
--
Ronnie


"Ryan Martin" wrote:

the column being 'A', it could be written this way:

=COUNTIF(A:A,"<130")-COUNTIF(A:A,"<120")

"Ronnie" wrote:

I need a formula to count the number of cells in a column that
contain
the
numbers between 120 and 129. Thanks for any input!
--
Ronnie






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
Counting the number of cells between 2 seperate cells mpenkala Excel Discussion (Misc queries) 2 April 16th 08 05:04 PM
Query counting cells in a row that exactly match cells in another Marlsnz Excel Discussion (Misc queries) 1 June 2nd 06 07:08 AM
Complicated counting of cells (based on other cells contents) George Excel Worksheet Functions 3 November 7th 05 06:39 PM
Counting empty cells within a range of cells Rosehill - ExcelForums.com New Users to Excel 2 May 2nd 05 08:53 AM
Counting empty cells within a range of cells Rosehill - ExcelForums.com New Users to Excel 0 April 7th 05 12:47 AM


All times are GMT +1. The time now is 10:58 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"