Well, you've made this much harder to test by using the RAND() formula and not then copying and pasting values, and I don't have time to fix that on top of the other changes that needed to be made. I hope that what you have shared this time properly reflects the real data, because I really don't have any more time to spend on this, sorry.
Attached are the COMPLETED up-to-date instructions, including a fix for the ROLL issue, and a copy of the workbook with the whole lot implemented.
I am happy to consider any MINOR tweaks going forward, but I won't be rewriting the whole lot a third time - I do hope you understand. You need to get stuck in and work through each of the steps in the queries to begin to understand how they work. It's a fairly steep learning curve with PQ, but very well worth the effort: this is something I now use every day at work.