+ Reply to Thread
Results 1 to 4 of 4

Sorting, summing and grouping data

  1. #1
    Registered User
    Join Date
    10-29-2018
    Location
    Lenexa, Kansas
    MS-Off Ver
    Office 16
    Posts
    2

    Question Sorting, summing and grouping data

    I have a large spreadsheet with several thousand rows of data. I need to break this data into subsets, first by location and then by weights which sum or total around 2000 tons each. It doesn't matter if there is one row or dozens that are put into a 2000 ton group together. The rows will not be consecutive.
    Currently, I filter by location and then summing by dragging the cursor until it is close to 2000 tons and then I do the math and then search for a row with approximately the correct weight. I can have a variation of up to 1%.
    Any suggestions on how to improve this tedious process? Thank you.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,882

    Re: Sorting, summing and grouping data

    Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    10-29-2018
    Location
    Lenexa, Kansas
    MS-Off Ver
    Office 16
    Posts
    2

    Re: Sorting, summing and grouping data

    I've attached a simplified workbook that I believe, shows what I have, how I do it and what I need. Thank you.
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,557

    Re: Sorting, summing and grouping data

    This proposal is more along the lines of "any help", however it may be useful to at least some degree.
    The presentation of the Receipt Numbers that will be grouped is not the same as in the after sheet, although it does yield the information for the 34 loads in rows 202:220.
    As the topic of single receipts for more 200 tons isn't addressed, Column C identifies receipts for more than 202 (1% variance) tons using: =IF(C2>202,"N/A","")
    Columns G:AL are populated using: =IF(SUMPRODUCT(--($F2:F2<>"")),"",IF(SUM(G$1:G1,$C2)>=202,"",$C2))
    Column AM, which checks to make sure each receipt is only used once is populated using: =SUMPRODUCT(--(F2:AL2<>""))
    Row 201 totals each column using: =SUM(G2:G200)
    Rows 202:220 display the receipt numbers that are grouped for the load using:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Note: In the attached copy of the file, I left the table in columns A:E as it originally appeared (post #3). However, I tested sorting the total tons column from largest to smallest and the totals are close to 202 (except the last one) and the number of loads is reduced to 31.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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. [SOLVED] Sorting Data and Grouping
    By Forex-Forex in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-28-2014, 05:19 PM
  2. Grouping, Summing, and Displaying data based off of user inputs
    By AlphaSkidz in forum Excel Programming / VBA / Macros
    Replies: 35
    Last Post: 10-05-2013, 08:11 AM
  3. Grouping and Sorting Data into Sub sections
    By Impartial Derivative in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-30-2011, 12:20 PM
  4. Grouping Data and Summing numbers by row
    By bluegreen in forum Excel General
    Replies: 5
    Last Post: 10-25-2010, 12:22 AM
  5. Data Sorting/Grouping Function
    By Blake 7 in forum Excel General
    Replies: 0
    Last Post: 10-19-2010, 02:50 PM
  6. Replies: 3
    Last Post: 08-08-2009, 05:05 AM
  7. Grouping and sorting data
    By coffee_n_tv in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-29-2008, 06:44 PM
  8. grouping and sorting data
    By mb7q in forum Excel General
    Replies: 0
    Last Post: 03-30-2006, 03:35 PM

Tags for this Thread

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