Counting values with IF value?

W

wester69

Hi,

I am struggling getting a formula to work and even quesitoning if I a
even using the right formula.

I want a total count my values (just number of) in column B based on I
column A has a specific value ("L" or "D")

This formula almost works but only requires one "L" value to be presen
in column A and I want it to look at each line through A2:A10

=COUNTA(IF(A2:A10="L",B2:B10))

Thanks!

-Wesle
 
T

T. Valko

Try this:

=SUMPRODUCT(--(ISNUMBER(MATCH(A2:A10,{"L","D"},0))),--(B2:B10<>""))

Biff
 
P

PCLIVE

I may not understand you correctly, but this will sum your values in column
B where Column A contains "L" or "D".

=SUMIF(A2:A10,"L",B2:B9)+SUMIF(A2:A10,"D",B2:B9)

HTH,
Paul
 
W

Wester

Thanks Ron, your solution was the ticket . Thank you also to the others for
helping.

I was on a wrong path!

This is what I needed =SUMPRODUCT((A2:A10="L")*(B2:B10<>"")). The other
solutions were adding only the numbered cells in my B column, were I needed
to just count them if they contained text, a number or cobination of text and
numbers.

Thanks Again!

-Wesley
 
Top