+ Reply to Thread
Results 1 to 4 of 4

SUM Help

  1. #1
    Registered User
    Join Date
    03-05-2012
    Location
    Helsinki, Finland
    MS-Off Ver
    Excel 2010
    Posts
    10

    SUM Help

    Hi All,

    I'm new here but from what I've read, there are quite a few helpful people. I'm confident this isn't a complicated problem but I'm looking for the most efficient way of solving it.

    I have an SQL query which returns the sales person's name (Identifier) along with an Amount. Each 'Identifier' can contribute to one sale. So for one sale for example, John and Frank could contribute.

    I'm looking for the formula that will be able to look up each 'Identifier' in a single 'Package' and give the resulting 'Sum'

    Thanks for taking a look!

    Help.xlsx

  2. #2
    Valued Forum Contributor
    Join Date
    08-22-2011
    Location
    Auckland
    MS-Off Ver
    Excel 2019
    Posts
    716

    Re: SUM Help

    If you separated the data in column A into separate columns it would be much easier. You could then use lookups to find the values. You can disguise the columns with formatting if you want the single column look.

  3. #3
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: SUM Help

    hi Heirak, welcome to the forum. try this in B2:
    =SUMPRODUCT(ISNUMBER(SEARCH($D$2:$D$6,A2))*$E$2:$E$6)

    or on the safe side:
    =SUMPRODUCT(ISNUMBER(SEARCH(" "&$D$2:$D$6&" "," "&SUBSTITUTE(A2,","," ")&" "))*$E$2:$E$6)
    this is needed when you have names like maryann & mary or ann, where another person's name may be within a name

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

  4. #4
    Registered User
    Join Date
    03-05-2012
    Location
    Helsinki, Finland
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: SUM Help

    Quote Originally Posted by benishiryo View Post
    hi Heirak, welcome to the forum. try this in B2:
    =SUMPRODUCT(ISNUMBER(SEARCH($D$2:$D$6,A2))*$E$2:$E$6)

    or on the safe side:
    =SUMPRODUCT(ISNUMBER(SEARCH(" "&$D$2:$D$6&" "," "&SUBSTITUTE(A2,","," ")&" "))*$E$2:$E$6)
    this is needed when you have names like maryann & mary or ann, where another person's name may be within a name
    Thank you very much! I'll be able to employ the first suggestion as the name was only an example.

    Thank you too Phil for the suggestion. I had thought about doing that but was on my list of not very efficient routes.

+ 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