shg,
Thanks. Still I don't believe there is someone can think about this just using formulas 
micro62w,
>>> I get an "out of stack space (error 28)" statement
Oops, that is easy to spot (based on the error code), I made a mistake in the quicksort routine.
I have updated my code on post #14, please try it again.
>>> The result may stretch beyond excels limits
On the updated code on post #14, I change the code so the output will come in several seperated sheets.
So for example if the output take 2,097,160 rows, the output will be displayed in these sheets :
- MyResults_1 (1,048,576 rows)
- MyResults_2 (1,048,576 rows)
- MyResults_3 (8 rows)
As for testing purpose, if using your file on post #1, and :
- change the value of cell bom!E2 to 004/28136/00
- edit this line of code :
maxRow = Sheets(1).Rows.Count
to
The macro will produce 4 sheets (MyResults_1 to MyResults_4)
>>> Can the code be carried over the "access" ?
Maybe, but I am not familiar with "Access", and I can imagine it will be extremely painfully very slow, since the process is performed based on file, not based on memory.
And beside, even if this could be done, how will you display the result then ?
But I guess using my edited code above (the output is seperated into several sheets), it will suite your need ?
>>> Additionally, I am wondering to carry the quantity and or u_m columns along do I continue to add to the existing code or is it best to supplement the results afterward.
If the problems above have been solved, then we can continue to this your next request (but not before solved).
If so, then upload your workbook with desired layout result.
Bookmarks