+ Reply to Thread
Results 1 to 4 of 4

Best function to sum quantities associated with text values?

  1. #1
    Registered User
    Join Date
    07-14-2010
    Location
    Houston, TX
    MS-Off Ver
    Excel 2007
    Posts
    4

    Best function to sum quantities associated with text values?

    I'm trying to sum a list of products that were sold for a particular month.

    My input data looks like this:

    Item QTY Sold QTY Paid
    Callaway Glove 2 20
    Callaway Glove 1 10
    Callaway Glove 6 55
    Odyssey Putter 1 120
    Titleist Irons 1 600
    Titleist Irons 2 1000
    .
    .
    .

    I'd like my ouput to look like this:

    Callaway Glove 9 85
    Odyssey Putter 1 120
    Titleist Irons 3 1600

    Here's one of the problems...This spreadsheet is 2000 rows long, and half of the products are duplicates (although unique sales). Is there a function that will start at the top of the spreadsheet, read through the entire spreadsheet, and then summarize everything on a line-item basis? I don't have a master product list to compare against (though this exercise will provide the basis for that going forward), thus this situation requires something a little more intuitive.

    Thanks for your help!

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Best function to sum quantities associated with text values?

    You can highlight the column of Item descriptions and use the Advanced Filter to create a list of [x] Unique Values only copied to another location.

    Once you have that new unique list, the function you want to use to collect all the totals in one column based on matching a single value to an adjacent column is SUMIF().

    =SUMIF(MatchRange, MatchValue, SumRange)
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Best function to sum quantities associated with text values?

    Hello golfretailer,

    The attached workbook has a button to run the macro below. This will create a summary of the stock line items on a separate sheet. Each time the macro is run, the previous summary data is deleted. The summary is sort in ascending order. Click the button and your done.
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Best function to sum quantities associated with text values?

    Alternatively - use a Pivot Table (see the link in sig. for general intro.)

+ 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