+ Reply to Thread
Results 1 to 6 of 6

Problem in defining a formula

  1. #1
    Registered User
    Join Date
    07-06-2010
    Location
    Dugo Selo, Croatia
    MS-Off Ver
    Excel 2003
    Posts
    3

    Problem in defining a formula

    Hi to all members of excelforum!
    I have one big problem, there is one BIG excel file and I have to sum columns, I'll explain by example:
    let's say that you have 2 columns - A (with names) and B (with values):

    A B
    bob 100
    bob 999
    bob 44
    john 122
    john 66
    mary 456
    mary 7878
    mary 212
    mary 52323

    How to sum all numbers in B with name in A? how to sum all numbers with the name john and then how to sum all numbers with mary in column A?

    It would be perfect if I can receive result:
    A B
    bob 15151
    john 626
    mary 654552

    Of course, my file is much bigger with 200 different names in column A, and each name hase at least 50 numbers to sum...is there any way to do this quickly?
    Last edited by okicizepa; 07-06-2010 at 04:52 AM.

  2. #2
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Problem in defining a formula

    Try this macro if you are happy with VBa

    [EDIT]
    This will work for 2007 and above (see Post #4 for 2003 version)

    Please Login or Register  to view this content.

    Hope this helps
    Last edited by Marcol; 07-06-2010 at 06:44 AM. Reason: Just noticed OP is using 2003
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  3. #3
    Forum Contributor
    Join Date
    05-16-2010
    Location
    UK
    MS-Off Ver
    2003 and 2007
    Posts
    252

    Re: Problem in defining a formula

    Try a pivot table

    ... if you are not

    EDIT:
    Please see attached.
    Attached Files Attached Files
    Last edited by pb71; 07-06-2010 at 06:05 AM. Reason: Attached example

  4. #4
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Problem in defining a formula

    Sorry, just noticed you are using 2003

    The code in Post #2 is for 2007 and above, it will fail on the sort method if used with 2003

    This should work for 2003 and above
    Please Login or Register  to view this content.

    Hope this helps

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Problem in defining a formula

    extract a unique list of names with advanced filter to say to col g
    then against that list in g in h put =SUMIF($A$1:$A$2000,G1,$B$1:$B$1000)
    see here
    http://www.contextures.com/xladvfilter01.html
    scroll down to Filter Unique Records
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  6. #6
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,375

    Re: Problem in defining a formula

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    PLEASE PM WHEN YOU HAVE DONE THIS AND I WILL DELETE THIS POST

+ 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