+ Reply to Thread
Results 1 to 17 of 17

Need help grouping by sales order # and sorting high to low

  1. #1
    Registered User
    Join Date
    01-13-2018
    Location
    Utah
    MS-Off Ver
    MS Office 16
    Posts
    8

    Need help grouping by sales order # and sorting high to low

    Hi All,

    I am trying to figure out how to Group by sales order number (column F) then sort by high to low dollar amount per sales order(column I). Right now it's sorted by high to low dollar amount by line item.

    I have played around with a Pivot Table but the only problem is I need to be able to add comments after sorting /manipulating the data. Pivot tables don't allow editing of any field. I also played around with Data-Subtotal but it didn't want to group like I need it to.

    Thank you so much for any help!

    See photo below:
    2018-01-13 00_05_48-Excel test grouping.xlsx - Excel.jpg
    Last edited by bhoth; 01-13-2018 at 03:14 AM.

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Need help grouping by sales order # and sorting high to low

    Select cell I2 and sort high to low (Z-A) then click in cell F2 and sort whichever way you want.
    It will group the data by sales order number but leave the dollar amounts in descending order for each.

    Or have I misunderstood what you're trying to achieve?

    BSB

  3. #3
    Registered User
    Join Date
    01-13-2018
    Location
    Utah
    MS-Off Ver
    MS Office 16
    Posts
    8

    Re: Need help grouping by sales order # and sorting high to low

    I wish it would work like that but it does not. As soon as you sort the column F2, it breaks the I2 column sort. Sales order 235679 is the biggest by dollar amount ($749.90) so I want it listed first with all it's line items, then 129369 ($711.61) then lastly sales order 123456 ($227.30). It would be nice to have a subtotal (could be a new column with subtotal).
    2018-01-13 08_45_22-Excel test grouping.xlsx - Excel.jpg
    Last edited by AliGW; 01-13-2018 at 12:20 PM. Reason: Unnecessary quotation removed.

  4. #4
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Need help grouping by sales order # and sorting high to low

    Looks like it's sorted just fine to me. Sales order ID's are grouped together and amounts are in descending order.

    Can you manually create what your desired outcome is and show is that?

    BSB

  5. #5
    Registered User
    Join Date
    01-13-2018
    Location
    Utah
    MS-Off Ver
    MS Office 16
    Posts
    8

    Re: Need help grouping by sales order # and sorting high to low

    Sure see below, I want the sales orders sorted high to low so the sales order with the largest value is first, sales order with the 2nd highest value sorted second and so on.
    2018-01-13 09_16_55-Excel test grouping.xlsx [Repaired] - Excel.png
    Last edited by AliGW; 01-13-2018 at 12:21 PM. Reason: Unnecessary quotation removed.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,448

    Re: Need help grouping by sales order # and sorting high to low

    Welcome to the forum!

    Firstly, please don't quote whole posts, especially when you are responding to the one immediately preceding your own - it's just clutter. It's OK to quote if you are responding to a post out of sequence, but limit quoted content to a few relevant lines that makes clear to whom and what you are responding. Thanks!

    For normal conversational replies, try using the QUICK REPLY box below.

    Secondly,will you please attach a sample Excel workbook? We are not able to work with or manipulate a picture of one and nobody wants to have to recreate your data from scratch.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired results are also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  7. #7
    Registered User
    Join Date
    01-13-2018
    Location
    Utah
    MS-Off Ver
    MS Office 16
    Posts
    8

    Re: Need help grouping by sales order # and sorting high to low

    Hi See attached the Excel file with the data setup manually.
    Attached Files Attached Files

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,194

    Re: Need help grouping by sales order # and sorting high to low

    Is this what you had meant??

    Untitled.png
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  9. #9
    Registered User
    Join Date
    01-13-2018
    Location
    Utah
    MS-Off Ver
    MS Office 16
    Posts
    8

    Re: Need help grouping by sales order # and sorting high to low

    Sorry no that does not work either. I really could care less how the sales order numbers are sorted. I want sales order line items grouped together with the sales order AMOUNT sorted high to low.

    Maybe my example does not work because there are not enough. Picture 1000 sales orders, all of them vary by the # of line items and by dollar amount. I want Excel to look through all the sales orders, figure out which sales order has the highest dollar amount, and group all the line items in the sales order first.

    Then look for the second highest sales order by dollar amount, group all the line items together and display right underneath the first sales order and so on.

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,194

    Re: Need help grouping by sales order # and sorting high to low

    Like this??

    Sort by helper and then amount??
    If not, manually sort a sample and show what you want.
    Attached Files Attached Files

  11. #11
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: Need help grouping by sales order # and sorting high to low

    maybe another point of view:
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    01-13-2018
    Location
    Utah
    MS-Off Ver
    MS Office 16
    Posts
    8

    Re: Need help grouping by sales order # and sorting high to low

    See attached manually set up exactly how I want it. Note that the sales order numbers are all out of order. The sales order with the highest dollar amount is first (with the line items sorted high to low). Then the sales order with the second highest dollar amount is listed next (with the line items sorted high to low) and so on.

  13. #13
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,194

    Re: Need help grouping by sales order # and sorting high to low

    How does that differ from the attachment at Post 10???

  14. #14
    Registered User
    Join Date
    01-13-2018
    Location
    Utah
    MS-Off Ver
    MS Office 16
    Posts
    8

    Re: Need help grouping by sales order # and sorting high to low

    Hi Glen, sorry I missed that before but yes that is correct. So how did you do that?

  15. #15
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,194

    Re: Need help grouping by sales order # and sorting high to low

    Well... as described. Here's the sort box
    Attached Images Attached Images

  16. #16
    Registered User
    Join Date
    01-13-2018
    Location
    Utah
    MS-Off Ver
    MS Office 16
    Posts
    8

    Re: Need help grouping by sales order # and sorting high to low

    I'll take a closer look at this thank you!

  17. #17
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,194

    Re: Need help grouping by sales order # and sorting high to low

    You're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

+ 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. Replies: 12
    Last Post: 11-07-2012, 01:37 PM
  2. Array trouble sorting high spenders
    By noodle48 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-28-2011, 01:38 PM
  3. Sorting lists by score (high to low)
    By sav1979 in forum Excel General
    Replies: 2
    Last Post: 06-14-2011, 10:17 AM
  4. Replies: 6
    Last Post: 12-12-2010, 12:34 AM
  5. Sorting from low to high
    By Jordans121 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-24-2010, 04:11 PM
  6. Sorting Data within cell low to high?
    By obnoxs32 in forum Excel General
    Replies: 5
    Last Post: 12-17-2007, 12:19 AM
  7. Sorting High to Low based on percent of total
    By Harold in forum Excel General
    Replies: 0
    Last Post: 04-05-2006, 12:20 PM
  8. Find all roots of a high-order equation
    By Pan in forum Excel General
    Replies: 1
    Last Post: 10-28-2005, 10:05 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