Sum Cell Values of one column based on Another Cell Value in a different column

  • Thread starter kristenb via OfficeKB.com
  • Start date
K

kristenb via OfficeKB.com

Hi All!

I need to place the sum of certain cell values in a separate cell. Easy
enough, except for one thing:

Here's the deal. If F21 has "B" in it, that's when I need E21's value added.
If there is ANYTHING else in column F, don't add the value of the
corresponding E column cell. I would like a function formula that I will
place in E6 that will work for the entire columns E & F.

Let me know if you need additional information to understand my query.

Thank you!
Kristen
 
F

FSt1

hi
sumif????
=sumif(F:F,"b",E:E)
but you can't put the formula in E6 else you would be a circular reference
error.
you could modify to something like
=sumif(F5:F500,"b",E5:E500) or what ever.

regards
FSt1
 
D

Duke Carey

if you are limiting this to when the cell in column contains ONLY a B, then

=sumif(F7:F100,"B",E7:E100)

if you want to sum when column F BEGINS with B, then

=sumif(F7:F100,"B*",E7:E100)

and if you want to sum anytime column F contains a B anywhere in the cell

=sumif(F7:F100,"*B*",E7:E100)
 
K

kristenb via OfficeKB.com

Thank you everyone! The =sumif that you all suggested worked perfectly! You
are all very helpful and thank you for the quick response!
Kristen



Bill said:
=sumproduct(--(F1:F1000="B"),(E1:E1000))
sumproduct needs a defined column length. I selected 1000

or you could try =sumif(F1:F1000,"B",E1:E1000)

with a sumproduct formula you can have more than one condition

see.....http://www.xldynamic.com/source/xld.SUMPRODUCT.html
[quoted text clipped - 11 lines]
Thank you!
Kristen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top