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:
=IFERROR(INDEX($B$2:$B$200,AGGREGATE(15,6,(ROW($2:$200)-1)/(G$2:G$200<>""),ROW(1:1))),"")
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.
Bookmarks