If statement - begins with

G

grantr

Anyone know how to create an if statement that would say, if any cells in the
column begin with B, sum the values in the column next to them.
 
T

Tyro

If your range with values possibly starting with B is A1:A10 and your range
with the values you want to sum is B1:B10 and you want the answer in C1 put
this formula in C1: =SUMIF(A1:A10,"B*",B1:B10) The formula is case
insensitive - B = b.

tyro
 
R

Rene

David, your formula partially worked for me. Can I compute a percentage
instead of sum? SUMPRODUCT(--(B1:B100>0),--(B1:B100<=100)/COUNT(B1:B100))

=SUMPRODUCT(((A1:A100)="B")*(B1:B100))

Thanks in advance.
Rene
 
R

Rene

This worked...

=SUMPRODUCT((M2:M10)="b")--SUMPRODUCT(--(F2:F10>0),--(F2:F10<=105))/COUNT(F2:F10)
 
Top