#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 553
Default CONDITIONAL COUNTING

I am trying 2 figure out a formula like a conditional sum but for counting
and not summing up.

Tried:
{=COUNT(IF($A$2:$A$7="A",IF($B$2:$B$72,$B$2:$B$7, 0),0))}
but its not working.

Thanx in advance.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default CONDITIONAL COUNTING

try:
=SUMPRODUCT(--($A$2:$A$7="A"),--($B$2:$B$72))

"FARAZ QURESHI" wrote:

I am trying 2 figure out a formula like a conditional sum but for counting
and not summing up.

Tried:
{=COUNT(IF($A$2:$A$7="A",IF($B$2:$B$72,$B$2:$B$7, 0),0))}
but its not working.

Thanx in advance.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,393
Default CONDITIONAL COUNTING

This
=SUMPRODUCT(--($A$2:$A$7="A"),--($B$2:$B$72))
will count how many values have an A-cell value of "A" and a B-cell value 2
while
=SUMPRODUCT(--($A$2:$A$7="A"),--($B$2:$B$72),$B$2:$B$7)
will sum those values
For more details, see
http://www.xldynamic.com/source/xld.SUMPRODUCT.html
http://mcgimpsey.com/excel/formulae/doubleneg.html

This also does the count:
{=SUM(IF((A1:A7="A")*(B1:B72),1,0))}
or more simply
{=SUM(((A1:A7="A")*(B1:B72)))}
best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"FARAZ QURESHI" wrote in message
...
I am trying 2 figure out a formula like a conditional sum but for counting
and not summing up.

Tried:
{=COUNT(IF($A$2:$A$7="A",IF($B$2:$B$72,$B$2:$B$7, 0),0))}
but its not working.

Thanx in advance.



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
Conditional formatting and counting. Pank Excel Discussion (Misc queries) 5 March 19th 07 09:11 AM
Conditional Counting Ladyengineer Excel Worksheet Functions 1 November 2nd 06 09:53 PM
Conditional counting ArthurN Excel Discussion (Misc queries) 5 March 1st 06 02:30 AM
conditional counting with Excel LeicaElmar Excel Worksheet Functions 1 October 17th 05 10:23 PM
conditional counting jim314 Excel Discussion (Misc queries) 5 June 22nd 05 12:36 AM


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