ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   If statement - begins with (https://www.excelbanter.com/excel-discussion-misc-queries/171999-if-statement-begins.html)

grantr

If statement - begins with
 
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.
--
grantr

Don Guillett

If statement - begins with
 
try
=sumproduct((left(a2:a22,1)="b"),c2:c22)
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"grantr" wrote in message
...
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.
--
grantr



David Biddulph[_2_]

If statement - begins with
 
Not an IF statement, but:
=SUMPRODUCT((LEFT(A1:A100)="B")*(B1:B100))
--
David Biddulph

"grantr" wrote in message
...
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.
--
grantr




Tyro[_2_]

If statement - begins with
 
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

"grantr" wrote in message
...
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.
--
grantr




grantr

If statement - begins with
 
Thanks David Biddulph!!
--
grantr


"David Biddulph" wrote:

Not an IF statement, but:
=SUMPRODUCT((LEFT(A1:A100)="B")*(B1:B100))
--
David Biddulph

"grantr" wrote in message
...
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.
--
grantr





Rene

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

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

Thanks in advance.
Rene

"David Biddulph" wrote:

Not an IF statement, but:
=SUMPRODUCT((LEFT(A1:A100)="B")*(B1:B100))
--
David Biddulph

"grantr" wrote in message
...
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.
--
grantr





Rene

If statement - begins with
 
This worked...

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

"Rene" wrote:

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

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

Thanks in advance.
Rene

"David Biddulph" wrote:

Not an IF statement, but:
=SUMPRODUCT((LEFT(A1:A100)="B")*(B1:B100))
--
David Biddulph

"grantr" wrote in message
...
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.
--
grantr






All times are GMT +1. The time now is 09:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com