+ Reply to Thread
Results 1 to 10 of 10

Sort by value and Sum

  1. #1
    Registered User
    Join Date
    05-25-2012
    Location
    Alaska
    MS-Off Ver
    Excel 2010
    Posts
    5

    Sort by value and Sum

    I'm trying to find a formula that will sort by the data in one column and then sum the quantities specific to the sort in another column.
    My spreadsheet looks like this:
    A B D
    QTY Unit Price Part Number
    3 4.29 CD895
    3 5.99 CD1095
    1 6.19 CD1195
    3 6.38 CD1195

    I want to sort column D and then have it total all the cells in column A that are associated with the part number.
    Thank you
    Last edited by purchasing; 05-25-2012 at 07:34 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Sort by value and Sum

    to sort, you could use the data/sort from the ribbon, and depending on how you want the totals to look, you could use a variation of sumif()
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: Sort by value and Sum

    Hi purchasing,

    This looks like a Pivot Table problem to me.
    http://www.addictivetips.com/windows...-pivot-tables/
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  4. #4
    Registered User
    Join Date
    05-25-2012
    Location
    Alaska
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Sort by value and Sum

    I've tried using the sumif formula however I'm not sure of the variation I would have to use. The data that I have to sort is rather large and from what I can tell you have to put in every "CD895" and so on...

  5. #5
    Registered User
    Join Date
    05-25-2012
    Location
    Alaska
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Sort by value and Sum

    Pivot tables are not something I've ever used before. I looked at the link and tried but it won't bring over my column that has my part numbers...is this because it's alpha/numeric???

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Sort by value and Sum

    i can work out the formula for you, but i noticed that your unit price varies...is that a concern, considering you will be adding volumes with different prices?
    Attached Files Attached Files
    Last edited by FDibbins; 05-25-2012 at 08:40 PM.

  7. #7
    Registered User
    Join Date
    05-25-2012
    Location
    Alaska
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Sort by value and Sum

    I'm buying CD's at different cost and selling them at a set cost depending on where the unit price falls into my range. I need to first figure out how many I have at CD895... and then an average based on that qty and unit price-hopefully this makes sense

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Sort by value and Sum

    see my attachment in my previous post, and letr me lnow if that giveds you what you want? i actually ran a calc for total cost for you as well

  9. #9
    Registered User
    Join Date
    05-25-2012
    Location
    Alaska
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Sort by value and Sum

    THANK YOU! THANK YOU! THANK YOU! It works I'm so excited!!!!!

  10. #10
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Sort by value and Sum

    glad to help

    this seems to have anwered your question : please take a moment to mark the tread as "solved", and consider adding the reputation to those that helped (see points 2 & 3 below

+ 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