+ Reply to Thread
Results 1 to 6 of 6

sumproduct help

  1. #1
    Registered User
    Join Date
    09-03-2008
    Location
    USA
    Posts
    2

    sumproduct help

    Col A contains strings, col B contains numbers.

    abc 2
    abc 3
    acb 1

    Add the values in col B for every "abc" in col A in the same row. In this example the answer would be 5.

    abc 2
    abc 3
    -------
    5

    edit: The search value (in this case abc) will be in another cell in the same worksheet (F5).

    Thanks

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    =Sumproduct(--(A1:A3="abc"),B1:B3)

    adjust ranges to suit

    or better:

    =Sumif(A1:A3,"abc",B1:B3)
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Hi

    Welcome to the forum, please take time to read the rules, and here is an answer for you

    =SUMPRODUCT(--(A1:A3="abc")*B1:B3)
    oldchippy
    -------------


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  4. #4
    Registered User
    Join Date
    09-03-2008
    Location
    USA
    Posts
    2
    Sorry, I forgot to add that the strings in col A must match a pattern in cell F5 not just a specific string. So if F5 contained *a*b*c* it would match abc aLbLc and a1b2c etc in col A and add the values fin col B together for the strings that matched in col B.
    Original posting

    Figured it out

    Thanks for the help.
    Last edited by oldchippy; 09-03-2008 at 09:04 AM.

  5. #5
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Instead of changing your posting... please repost the revised question and supply the solution you got.

    This may help future users with similar problem.

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Since you didn't bother to post your original revised question (oldchippy did it for you) and you didn't supply your own solution... I assume your solution was to simply use Sumif() since the "*" in F5 indicate wildcards...

    e.g. =Sumif(A:A,F5,B:B)

    This would find all instances of strings in column A containing the letters "a", "b" and "c" separated by any other characters...and it would sum corresponding values in columnB

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Using sumproduct to find average
    By nitinjoshi123 in forum Excel General
    Replies: 9
    Last Post: 05-29-2008, 08:11 AM
  2. [SOLVED] Can Sumproduct be used to get values instead of Count & Sum?
    By all4excel in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-28-2008, 09:30 AM
  3. Sum nested within Sumproduct
    By MCII in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-04-2008, 01:20 PM
  4. Help needed with SUMPRODUCT please
    By Potoroo in forum Excel General
    Replies: 7
    Last Post: 08-16-2007, 03:55 AM
  5. Sumproduct formula issue
    By nfison in forum Excel General
    Replies: 5
    Last Post: 05-14-2007, 03:49 PM

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