PDA

View Full Version : using sumproduct or sumif



alienscript
11-05-2009, 10:04 AM
Hi !

Is there a way to use sumproduct or sumif formula to count the number of cells that has the value in column B greater than or equal to the corresponding value in column A ?

In the sample workbook(Excel 2003), the answer should be 10. Appreciate any help that is given. Thanks!

tkaplan
11-05-2009, 10:07 AM
=SUMPRODUCT(--(B1:B20>=A1:A20))

MaximS
11-05-2009, 10:31 AM
try that:

{=SUM(IF(B1:B20>=A1:A20,1,0))}

with ctrl+shift+enter

alienscript
11-05-2009, 06:06 PM
Thanks for that, but both suggestions give the summation. What I want is to count the number of cells when the condition is true.

Anyone can help me on this?

Thanks.

Zack Barresse
11-05-2009, 10:40 PM
Both formulas actually give you the count, NOT the sum. Is that not what you're looking for?

alienscript
11-05-2009, 11:46 PM
I'm terribly sorry coz I thought sumproduct and sum are only summation functions... It works perfectly! I can't say how much I'm grateful for the help... Thanks so much :)

Zack Barresse
11-05-2009, 11:49 PM
Check out the SUMPRODUCT forum. Good stuff. :)