+ Reply to Thread
Results 1 to 4 of 4

Sum column if one condition is met

  1. #1
    Registered User
    Join Date
    10-23-2008
    Location
    USA
    Posts
    78

    Sum column if one condition is met

    I have two columns
    Column A
    John - 001
    John - 002
    Mary - 506
    Mark - 883
    MaryAnn - 789

    Colum B
    4
    5
    3
    5
    3

    I would like a formula that adds up the numbers from Column B across all the same names (with no - number)

    End result should be:
    John 9
    Mary 3
    Mark 5
    MaryAnn 3

    What's the formula?

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Sum column if one condition is met

    =SUMIF(A:A,X1&"*",B:B)

    where X1 contains the first name to match up

    copied down
    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
    Registered User
    Join Date
    10-23-2008
    Location
    USA
    Posts
    78

    Re: Sum column if one condition is met

    Quote Originally Posted by NBVC View Post
    =SUMIF(A:A,X1&"*",B:B)

    where X1 contains the first name to match up

    copied down
    the formula is very nice but the list of names is dynamic so changing all the time. I was thinking of maybe using a LEFT formula instead of the X1 you mentioned but it does not work.

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Sum column if one condition is met

    A:A and B:B account for the whole column... so if the original list is dynamic, then it works always... I am not sure what you mean by using the LEFT() function instead.. how would that improve it?

+ 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