Re: COUNTIF or SUMPRODUCT

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




Thom,

Do you mean that even if A is blank if B has data, count that row or
count B if there is data?

=SUMPRODUCT(--(B1:B10<>""))

If you are using more than one range, the ranges have to be the same
number of rows or columns for it to work. If you want to count B if
you find specific data like the number 1 in A then try,

=SUMPRODUCT((A1:A10=1)*(B1:B10<>""))

If this is not what you mean and you want the count to be contingent
upon *ANY* data existing in both A and B then my original post should
work for you.

Note: If your data consists of text and numbers then using >"" won't
work because numbers (unless stored as text) are not recognized as
being greater than "".



HTH
Steve


--
SteveG
------------------------------------------------------------------------
SteveG's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=7571
View this thread: http://www.excelforum.com/showthread.php?threadid=560446

.


Quantcast