+ Reply to Thread
Results 1 to 7 of 7

Sum parts of a column based on a category from another column

  1. #1
    Registered User
    Join Date
    07-26-2012
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    3

    Sum parts of a column based on a category from another column

    I tried searching but I'm not very good with some of these advanced macros, so I'm not sure how to do it...but here's my predicament.

    I am trying to manage all of my horse betting in Excel. In column "D," I have the amount of the bet, and in column "E" the type of bet (this will only ever be entered as one of the following: WIN, PLC, SHW, EXA, TRI, SPR). In column "G" I have the total cost of the bet.

    Now, my primary concern is this - off to the side, I have "total spent on WIN," and "total spent on SHW," etc... how can I get the total amount from column "G" (since that will have the total for all horses, manually calculated by however many horses I typed in) only if, in the same row, the column "E" specifies "WIN?" This way I can get the total amount I'm spending on "WIN" bets.

    Bonus points:

    It would be even cooler if I could teach column "G" to automatically calculate the bet based on how many horses I type in. I always type in the horses separated by a comma and a space, such as "2, 7, 5" or if it's just one horse, then it's merely the number, such as "3" - any way to teach it to figure that out too without screwing up the first thing?

    Thanks to anyone who can help!!
    Last edited by Matchboxx; 07-26-2012 at 09:38 PM.

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Sum parts of a column based on a category from another column

    Hi Matchboxx,

    Welcome to the forum.

    Would suggest you to upload a sample workbook. thanks.

    Regards,
    DILIPandey

    <click on below 'star' if this helps.
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Registered User
    Join Date
    07-26-2012
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Sum parts of a column based on a category from another column

    Hi,

    Workbook I'm using is attached.
    Attached Files Attached Files

  4. #4
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Sum parts of a column based on a category from another column

    Hi matchboxx,

    I believe you can use SUMIF function :-

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


    See attached file, blue cells :- Horse Betting.xls

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

  5. #5
    Registered User
    Join Date
    07-26-2012
    Location
    United States
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Sum parts of a column based on a category from another column

    That helped immensely! Thank you!

  6. #6
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Sum parts of a column based on a category from another column

    You are welcome Matchboxx..

    Cheers

    Please mark this thread as [SOLVED]. Thanks.

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

  7. #7
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Sum parts of a column based on a category from another column

    @ Matchboxx

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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