+ Reply to Thread
Results 1 to 5 of 5

Grouping rows based on keywords and summing the associated total amounts

  1. #1
    Registered User
    Join Date
    05-31-2013
    Location
    Seattle
    MS-Off Ver
    Excel 2013
    Posts
    48

    Grouping rows based on keywords and summing the associated total amounts

    Hi all,

    First of all, you guys are always so insightful and helpful here -- thank you so much! All of my excel knowledge is due to the helpful folks around here and I cannot express my gratitude enough. OK so this next problem I have is a little bit confusing, and so I apologize for the confusing title (I am not sure what the best way is to describe my issue). Here it goes:

    I am pulling all my data from a database of different projects that have different (but similar) descriptions -- each project corresponds with a total amount. I would like to group all of the similar projects together into one and sum their corresponding totals. So for example, lets say this is the data:

    A B C
    1 Date Project Description Amount
    2 2/2/2015 Amazon ServiceType Service Restack Design California (123) 5,000
    3 1/30/2015 Amazon Warehouse FDC Florida (8910) 10,000
    4 3/25/2015 Amazon Typical Description Goes Here Random (1YN0) 5,000
    5 3/3/2015 Nordstrom Typical Description Goes Here Random (50BN) 8,000
    6 3/3/2015 US Food and Drug Administration Typical BUT DIFFERENT NOW Description Goes Here Random (LL6) 10,000
    7 1/15/2015 Banana Republic Description Goes here Test (WEB51) 850
    8 4/13/2012 Nordstrom Typical Description BUT DIFFERENT A Goes Here Random (50BN) 3,000
    9 6/10/2015 Nordstrom Typical Description but different B Goes Here Random (50BN) 6,000
    10 5/8/2015 Amazon Warehouse FDC Florida (8910) 15,000
    11 10/17/2013 Banana Republic Description Goes Here But it is less (500) 200
    12 10/16/2014 US Food and Drug Administration Typical Description Goes Here Random (200006) 10,800
    13 9/18/2011 Cabelas Description Goes Here Typical One (BY10) 15,000
    14 11/24/2014 Amazon ServiceType Service Restack RANDOM DESCRIPTION Design California (123) 17,500
    15 8/4/2014 US Food and Drug Administration Typical Description Goes Here Random (Lot9) 5,000
    16 10/15/2013 US Food and Drug Administration Typical Description Goes Here Random (Lot9) 8,000
    17 2/13/2015 US Food and Drug Administration Typical Description Goes Here Random (Lot500) 3,000
    18 5/1/2015 Cabelas Description Goes Here Number 1 (Random87) 900
    19 2/5/2015 Cabelas Description Goes Here but It is less than 20,000 (LOL) 1,200
    20 5/28/2015 US Food and Drug Administration Typical Description Goes Here Random (Lot9) 5,000

    So above is an example of how the data I'm working with looks like. I have changed the dates/descriptions/amounts for illustrative purposes. I would like to group all projects that have receipts that total over $20,000 when grouped together. So in this example, the final product would look like:

    F G
    1 Client Name Total Amount
    2 Amazon 52,500
    3 US Food and Drug Administration 41,800


    So the "Total Amount" (column G - second table) is the sum of ALL of the values in the "Amount" column (Column C - first table), and it is grouped by client name -- the client name is usually the first word of the
    "project description" (Column B - first table)but it is sometimes the first five words as is the case with "US food and drug administration" since this client name is 5 words long. Also "banana republic" would be an example of a client name that is 2 words long.

    Also if the sum of all the values in the "Amount" column is less than 20,000, then I do not want it to be included, which is why only Amazon and the US Food and Drug Administration show up in the second table. The sum of the amounts for Nordstrom, Cabelas, and Banana Republic are all less than 20,000.

    Nordstrom: 17,000 (since 8,000 + 3,000+ 6,000 = 17,000)
    Cabelas: 17,100 (since 15,000 + 900 + 1,200 = 17,100)
    Banana Republic: 1,050 (since 850 + 200 = 1,050)

    Thus Nordstrom, Cabelas, and Banana Republic are not included in columns F & G.

    I hope this request makes sense. Right now the way that I have been doing it is sorting the data manually by "project description" (Column B), and just summing all the project amounts that have similar project names. But this gets very tedious when I have 6000 rows of data to go through. You guys have always been so incredibly helpful here, I look forward to your amazing insights!
    Last edited by tvwright; 07-07-2015 at 07:54 PM.

  2. #2
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,373

    Re: Grouping rows based on keywords and summing the associated total amounts

    Plese find the file atach, Im using helper table for easy formula...and Im using array formula..

    Regards
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    05-31-2013
    Location
    Seattle
    MS-Off Ver
    Excel 2013
    Posts
    48

    Re: Grouping rows based on keywords and summing the associated total amounts

    Quote Originally Posted by azumi View Post
    Plese find the file atach, Im using helper table for easy formula...and Im using array formula..

    Regards
    Hi Azumi,

    Yay! That works perfectly. Now if only I knew how you were able to figure that out :P Thank you so much for all ofyour amazing help. What does the { at the very beginning of the formula in cell I2 do?

  4. #4
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,373

    Re: Grouping rows based on keywords and summing the associated total amounts

    That's sign for array formula, and dont' type it manually, curly brackets "{}" showed up if you press CTRL+SHIFT+ENTER button all together, ENTER alone don't works. Pls learn about it, array formula is important in excel....

    regrads

  5. #5
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 2019
    Posts
    2,373

    Re: Grouping rows based on keywords and summing the associated total amounts

    and thanks for kind feedback

+ 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. Summing large amounts of data based on certain attributes
    By excel_newbert in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-18-2012, 04:25 PM
  2. Grouping and summing rows
    By stevewash123 in forum Excel General
    Replies: 1
    Last Post: 03-17-2012, 09:12 AM
  3. Replies: 4
    Last Post: 11-23-2010, 07:10 PM
  4. Grouping amounts based on working days
    By obionenairobi in forum Excel General
    Replies: 9
    Last Post: 10-02-2010, 05:00 AM
  5. Summing Amounts from Multiple Rows
    By Valmanway in forum Excel General
    Replies: 5
    Last Post: 06-25-2009, 04:34 AM

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