+ Reply to Thread
Results 1 to 7 of 7

SUM(If a cell contains a certain word, then return the value of that cell (another cell))

  1. #1
    Registered User
    Join Date
    11-14-2012
    Location
    Spain
    MS-Off Ver
    Excel 2007
    Posts
    34

    SUM(If a cell contains a certain word, then return the value of that cell (another cell))

    I did a search and could not find the solution, so there it goes:

    I have a table with nine funds (c4:c12) and a style for each fund (D4:D12), I want a formula in C17 that will sum the weight of each fund (b4:b12) if d4=Balanced, d5=Balanced, d6=Balanced and so on.

    Can I do this? I tried with =SUM(IF(D4:D12=''Balanced'';B4:B12;'''') but it gave back an error.

    Can you help me?
    Attached Files Attached Files

  2. #2
    Forum Expert Kevin UK's Avatar
    Join Date
    12-07-2010
    Location
    Radstock, Somerset
    MS-Off Ver
    365
    Posts
    1,922

    Re: SUM(If a cell contains a certain word, then return the value of that cell (another cel

    Hi gjrr4x1

    Try the following in C17 and copy down.

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  3. #3
    Forum Expert Moo the Dog's Avatar
    Join Date
    09-28-2012
    Location
    Wisconsin
    MS-Off Ver
    Office 365 (PC & Mac)
    Posts
    1,845

    Re: SUM(If a cell contains a certain word, then return the value of that cell (another cel

    You can try this:

    =SUMIF($D$4:$D$12;"Balanced";$B$4:$B$12)

    - Moo

    * Kevin UK beat me to it.
    Looks like you use semi-colons as argument separators, so I changed the commas to semi-colons above
    Last edited by Moo the Dog; 12-12-2012 at 12:28 PM. Reason: Changed argument separators

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: SUM(If a cell contains a certain word, then return the value of that cell (another cel

    Try this in C17 and copy down.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  5. #5
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: SUM(If a cell contains a certain word, then return the value of that cell (another cel

    Since you're using semicolons instead of commas:

    Please Login or Register  to view this content.
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  6. #6
    Registered User
    Join Date
    11-14-2012
    Location
    Spain
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: SUM(If a cell contains a certain word, then return the value of that cell (another cel

    Wow, thanks for the quick response Kevin!

    That formula worked perfectly, can't believe it took me half an hour to get nothing and you solved the problem in a matter of seconds. Impressive!

    Thankyou very much for your help!
    Have a nice evening.

  7. #7
    Registered User
    Join Date
    11-14-2012
    Location
    Spain
    MS-Off Ver
    Excel 2007
    Posts
    34

    Re: SUM(If a cell contains a certain word, then return the value of that cell (another cel

    Thanks to ConneXionLost, Norie, and Moo the Dog as well! I really envy your MS Excel skills, thanks for the help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1