Link to home
Start Free TrialLog in
Avatar of MCaliebe
MCaliebeFlag for United States of America

asked on

Selective comparison to count

This is a follow up to a previously answered question.

{=SUM(($BH$3:$BH$507>=BQ3:BQ507)*1)}

I am using the above formula to evaluate and compare two columns of numbers.

Column range BQ3:BQ507 has the ability to contain 0.  Is it possible to use the above formula, or something similar, to evaluate only those cells which have a number greater then 0?

Thanks for your input.
ASKER CERTIFIED SOLUTION
Avatar of Saqib Husain
Saqib Husain
Flag of Pakistan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I am not sure but I think you can get rid of *1 for this case

{=SUM((BQ3:BQ507<>0)*($BH$3:$BH$507>=BQ3:BQ507))}
Avatar of MCaliebe

ASKER

I didn't try the other example...the initial worked fine.

Now, I just need to get schooled on what an "Array" formula is and I need to use them.  Any suggetions?
To understand this start with a small range say

{=SUM((BQ3:BQ7<>0)*($BH$3:$BH$7>=BQ3:BQ7))}

then

Formulas > Formula auditing > Evaluate formula

Step through this by clicking the Evaluate button and see how the formula works.
Thanks!  I am following this.  In addition, I found a good article here http://office.microsoft.com/en-us/excel-help/introducing-array-formulas-in-excel-HA001087290.aspx on how and why we use array formulas.