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


I am still having an issue with counting values:

I want to count the number of values in multiple cells that meet a condition.

Two of the conditions a
Greater than 6 but less than 10
Greater than 11 but less than 15

The countif function only lets me calculate one time correctly.

When the countif function is used twice in the same cell, subtracting the
two answers, it gives me an answer that is one more than it should be.

An example of the function I have tried from another post is this:
=(COUNTIF(B2:B28,"=6")-COUNTIF(B2:B28,""<=10))
--
Barb
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 179
Default Counting Values

Hi
You can use countif array function:
=COUNT(IF((B2:B28=6)*(B2:B28<10),B2:B28))+COUNT(I F((C2:C28=11)*(C2:C28<15),C2:C28))
OR
=COUNT(IF((B2:B28=6)*(B2:B28<10),B2:B28))+COUNT(I F((C2:C28=11)*(C2:C28<15),C2:C28))

Once you entered function, press "Ctrl+Shift+Enter"

With regards
Rafeek M

"Barb Miles" wrote:


I am still having an issue with counting values:

I want to count the number of values in multiple cells that meet a condition.

Two of the conditions a
Greater than 6 but less than 10
Greater than 11 but less than 15

The countif function only lets me calculate one time correctly.

When the countif function is used twice in the same cell, subtracting the
two answers, it gives me an answer that is one more than it should be.

An example of the function I have tried from another post is this:
=(COUNTIF(B2:B28,"=6")-COUNTIF(B2:B28,""<=10))
--
Barb

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 695
Default Counting Values

=SUMPRODUCT((B2:B286)*(B2:B28<10)*(B2:B28))+SUMPR ODUCT((B2:B2811)*(B2:B28<15)*(B2:B28))

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,688
Default Counting Values

Hi!

Try these:

Greater than 6 but less than 10


=COUNTIF(B2:B28,"6")-COUNTIF(B2:B28,"=10")

Greater than 11 but less than 15


=COUNTIF(B2:B28,"11")-COUNTIF(B2:B28,"=15")

Biff

"Barb Miles" wrote in message
...

I am still having an issue with counting values:

I want to count the number of values in multiple cells that meet a
condition.

Two of the conditions a
Greater than 6 but less than 10
Greater than 11 but less than 15

The countif function only lets me calculate one time correctly.

When the countif function is used twice in the same cell, subtracting the
two answers, it gives me an answer that is one more than it should be.

An example of the function I have tried from another post is this:
=(COUNTIF(B2:B28,"=6")-COUNTIF(B2:B28,""<=10))
--
Barb



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 unique values with criteria Kevin McCartney Excel Worksheet Functions 10 December 31st 09 04:02 PM
Counting Values on a condition madeforidiots Excel Worksheet Functions 1 July 27th 05 12:40 AM
If Then, not using values, or not counting blanks Need Help 123 Excel Worksheet Functions 8 July 20th 05 06:23 PM
Counting Values Adam1 Chicago Excel Discussion (Misc queries) 4 January 7th 05 07:39 PM
Counting values Adam1 Chicago Excel Worksheet Functions 9 December 21st 04 03:36 PM


All times are GMT +1. The time now is 04:02 AM.

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"