#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default CountIf Function

I have a range of numbers between 1 and 25 in 50 cells.

How could I use the countif function to look at that range of numbers for
values between 5 and 10 and count those values that meet the criteria of
between 5 and 10?

Or if there is another function to use, let me know.

Thank you.
--
Barb
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 94
Default CountIf Function


Barb Miles wrote:
I have a range of numbers between 1 and 25 in 50 cells.

How could I use the countif function to look at that range of numbers for
values between 5 and 10 and count those values that meet the criteria of
between 5 and 10?

Or if there is another function to use, let me know.

Thank you.
--
Barb


Hi Barb,

Maybe you can use the Sumproduct()

Something along the lines of:

=SUMPRODUCT(--(A1:A505),--(A1:A50<10))

Regards,
Bondi

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 180
Default CountIf Function

Use countif twice, once to count those that are =5 and a second time to
count those that are 10. The difference is the count of those in the range
[5,10]:
=countif(range,"=5")-countif(range,"10")

"Barb Miles" wrote:

I have a range of numbers between 1 and 25 in 50 cells.

How could I use the countif function to look at that range of numbers for
values between 5 and 10 and count those values that meet the criteria of
between 5 and 10?

Or if there is another function to use, let me know.

Thank you.
--
Barb

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default CountIf Function

Doesn't the sumproduct function ADD the values, not count them?
--
Barb


"Bondi" wrote:


Barb Miles wrote:
I have a range of numbers between 1 and 25 in 50 cells.

How could I use the countif function to look at that range of numbers for
values between 5 and 10 and count those values that meet the criteria of
between 5 and 10?

Or if there is another function to use, let me know.

Thank you.
--
Barb


Hi Barb,

Maybe you can use the Sumproduct()

Something along the lines of:

=SUMPRODUCT(--(A1:A505),--(A1:A50<10))

Regards,
Bondi


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 94
Default CountIf Function


Barb Miles wrote:
Doesn't the sumproduct function ADD the values, not count them?
--
Barb


"Bondi" wrote:


Barb Miles wrote:
I have a range of numbers between 1 and 25 in 50 cells.

How could I use the countif function to look at that range of numbers for
values between 5 and 10 and count those values that meet the criteria of
between 5 and 10?

Or if there is another function to use, let me know.

Thank you.
--
Barb


Hi Barb,

Maybe you can use the Sumproduct()

Something along the lines of:

=SUMPRODUCT(--(A1:A505),--(A1:A50<10))

Regards,
Bondi



Hi,
Well it does sum the products. But in this case the products will be 1
when both conditions are met and 0 if none or only one of the
conditions are met. So it will sum all the 1's where both conditions
are met and hence function somthing like a counting function.

Regards,
Bondi



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


Enter the following

=SUM((((A1:A20)<10)+((A1:A20))5)*1)

After entering the above you need to press the Ctrl, Shift and Enter
keys to enter it as an array.


--
patele
------------------------------------------------------------------------
patele's Profile: http://www.excelforum.com/member.php...o&userid=35849
View this thread: http://www.excelforum.com/showthread...hreadid=562474

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default CountIf Function

This does not work. It returns an answer of one more than the answer should
be.
--
Barb


"bpeltzer" wrote:

Use countif twice, once to count those that are =5 and a second time to
count those that are 10. The difference is the count of those in the range
[5,10]:
=countif(range,"=5")-countif(range,"10")

"Barb Miles" wrote:

I have a range of numbers between 1 and 25 in 50 cells.

How could I use the countif function to look at that range of numbers for
values between 5 and 10 and count those values that meet the criteria of
between 5 and 10?

Or if there is another function to use, let me know.

Thank you.
--
Barb

  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default CountIf Function


Barb,

Don't know if you found the answer yet but here a formula that should
work for you. Let me know if it does.

=COUNTIF(A1:A50,"=5")-COUNTIF(A1:A50,"10")

Ed


--
patele
------------------------------------------------------------------------
patele's Profile: http://www.excelforum.com/member.php...o&userid=35849
View this thread: http://www.excelforum.com/showthread...hreadid=562474

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default CountIf Function


Hi, how about something simple like :
Range is 1 to 10
criteria is '5
criteria is '<11
Use one Countif to work out the answer for values over 5 in the range
Use one Countif to work out the answer for values less than 11
Answer 2 less answer 1 = correct number of values less greater than 5
but less than 11 - sorry, but it's a bit basic !

eg.
1
2
3
4
5
6
7
8
9
10

5

<11
FORMULA
5 =COUNTIF($A$6:$A$15,A17)
10 =COUNTIF($A$6:$A$15,A18)
5 =+A20-A19


--
Swaroon
------------------------------------------------------------------------
Swaroon's Profile: http://www.excelforum.com/member.php...o&userid=36527
View this thread: http://www.excelforum.com/showthread...hreadid=562473

  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default CountIf Function


I have a similar issue.

I am trying to count two columns with different data.


=countif(E5:E10,"=F") and (F5:F10,"=X")
=countif(E5:E10,"=M") and (F5:F10,"=X")

I am not getting any results

Jim


--
excesspotential
------------------------------------------------------------------------
excesspotential's Profile: http://www.excelforum.com/member.php...o&userid=36540
View this thread: http://www.excelforum.com/showthread...hreadid=562474



  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default CountIf Function


excesspotential Wrote:
I have a similar issue.

I am trying to count two columns with different data.


=countif(E5:E10,"=F") and (F5:F10,"=X")
=countif(E5:E10,"=M") and (F5:F10,"=X")

I am not getting any results

Jim


Basically, just copy what Bondi stated up above:

=SUMPRODUCT(--(A1:A505),--(A1:A50<10))

except twist it into:

=SUMPRODUCT(--(E5:E10="F"),--(F5:F10="X"))
=SUMPRODUCT(--(E5:E10="M"),--(F5:F10="X"))

Scott


--
Maistrye
------------------------------------------------------------------------
Maistrye's Profile: http://www.excelforum.com/member.php...o&userid=36078
View this thread: http://www.excelforum.com/showthread...hreadid=562474

  #12   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default CountIf Function


Outstanding:)


--
excesspotential
------------------------------------------------------------------------
excesspotential's Profile: http://www.excelforum.com/member.php...o&userid=36540
View this thread: http://www.excelforum.com/showthread...hreadid=562474

  #13   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default CountIf Function


Yes I agree, OUTSTANDING! I've read many threads looking for a
simple formula like this that works. Well Done!


--
tz81c1
------------------------------------------------------------------------
tz81c1's Profile: http://www.excelforum.com/member.php...o&userid=36538
View this thread: http://www.excelforum.com/showthread...hreadid=562474

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
Custom functions calculating time arguments Help Desperate Bill_De Excel Worksheet Functions 12 April 25th 06 02:22 AM
CountIf Function Question Josh in Indy Excel Discussion (Misc queries) 4 April 6th 06 08:28 PM
CountIF Function On Linked Spreadsheet Josh in Indy Excel Discussion (Misc queries) 0 April 5th 06 05:09 PM
can you use countif function for noncontiguous cells rutledbr Excel Worksheet Functions 2 November 13th 05 09:15 PM
Excel option to store trendline's coefficients in cells for use Miguel Saldana Charts and Charting in Excel 9 June 20th 05 08:45 PM


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