Using a few summary/calc fields, desired output can be achieved in 3 simple script steps = Import, Sort and Export.
There is no need to find, delete duplicate records, insert values into fields or whatever.
Unsure how the box quantity summary line is to be sorted (qty,box or box,qty), but that is easily addressed by changing the sort order.
The example file contains your sample data already Imported, just click Sort button then Export button. (dialog boxes enabled to show sort and export order)
user25682.fmp12.zip 67.8 K
Thank you, so much! That's perfect!
I was so focused on deleting the record that I never even went down this path.