Shorter versions of my posted formulas:
Count any values
C1: =SUMPRODUCT((A2:A10={"L","D"})*(B2:B10<""))
Count numeric values
C1: =SUMPRODUCT((A2:A10={"L","D"})*ISNUMBER(B2:B10))
***********
Regards,
Ron
XL2002, WinXP
"Ron Coderre" wrote:
Try something like this:
With
A2:A10 containing any value or no value
B2:B10 containing any value or no value
This formula returns the count of the Col_B values (ignoring blanks) where
the corresponding Col_A value is either L or D:
C1: =SUMPRODUCT(((A2:A10="L")+(A2:A10="D"))*(B2:B10<" "))
This one only counts numeric values:
C1: =SUMPRODUCT(((A2:A10="L")+(A2:A10="D"))*ISNUMBER(B 2:B10))
Does that help?
***********
Regards,
Ron
XL2002, WinXP
"wester69" wrote:
Hi,
I am struggling getting a formula to work and even quesitoning if I am
even using the right formula.
I want a total count my values (just number of) in column B based on IF
column A has a specific value ("L" or "D")
This formula almost works but only requires one "L" value to be present
in column A and I want it to look at each line through A2:A10
=COUNTA(IF(A2:A10="L",B2:B10))
Thanks!
-Wesley
--
wester69
------------------------------------------------------------------------
wester69's Profile: http://www.officehelp.in/member.php?userid=4689
View this thread: http://www.officehelp.in/showthread.php?t=1278723
Posted from - http://www.officehelp.in