What did you use to test the cells with? If its those cheaper testers like Opus or others. Ie testers under 40USD then you have +-10% as result from start so sorting closer than that doesnt gain much. As you can see that is easy 200mAh up or down on 2Ah cell
So sorting in 1 or even 5mAh is quite useless.
So for deviation or divergence.. Use cells that have high SOH at first hand, then use all cells closest in mAh... Then you make up what you will be able to build. If thats ok then go. If not you need to collect more cells.
In real numbers some say 100mAh. I would personally say 3-400mAh easy on larger packs say 80+ cells.
I've created 84 packs (so far) of 260ah each. I randomly distribute the 100mah categories but also added each cell to get between 260ah and 261ah per pack 'exactly' based on OPUS tests at 500ma discharge. So they are all within 1000mah (.3%) of each other in terms of simply adding up the individual cells. Then I deployed the packs....
10% of the packs needed some touch up - between 6000mah (3 cells) and 12,000mah (6 cells) on 7 of the 8. One pack needed 24,000mah (12 cells) added but I think that's an anomaly / bad process. After touching up these 8 - all are running very well with the other 76 packs with only modest balance touch-up needed every 5 months or so. Here's today's Batrium - been about 6 weeks since the last balance...
As Daromer was suggesting... (at least my interpretation)... packs are not 'exact' in terms of the sum of the individual tested mah / cell / pack. I believe that 8 of the 84 packs were between 6000mah (2.3%) and 12,000mah (4.%) off based on the simple 'add the cells up'... due to unavoidable fluff in equipment / test process / chemistry / used-nature of individual second hand cells.
This is why I build my packs with a few blank spots - so I can adjust them. The good news is that packs *can* be adjusted to really tune things in.
Use random when doing this large cells in the capacity range the test is using. That will get you closest and its proven several times that its quick and works.
I havent touched up my cells. Instead i dont run them to 0% SOC.
Ah yes, leave it to me to be the grain of sand in everyone's eye. In my case I used 6 different charger/testers (OPUS, LiitoKala, Foxnovo, SkyRC, Xtar, and Zanflare) for my first wolfenstein (Samsung, LG, Sanyo, and Panasonic cells of varying mAh ratings) battery. With an understanding that the mAh results of all of them would be skewed one way or another by at least 8%. Of course as I continually reiterate a proper IR reading as the first touch of the cell will give you a good idea that the cell is healthy and ready to charge/test and will give you good results. So after processing >6000 cells I came up with 1120 good cells that I felt where worthy of my 14s80p battery. I sorted my excel recorded cells by IR range >40mΩ and <56mΩ with a mAh capacity range of ≥2250mAh to ≤2700mah. I then ran these cells through a custom repackr built for excel and built the packs. All of the packs had 80 cells and the design was such as it would be difficult to replace, add, or subtract any cells to the pack. So I had to be sure this was going to work first shot. Believe me I was nervous when I tested my first pack and then even more nervous on the second. When the mAh of the second pack was really close to the first and the 3rd was also right on I started to breath easier. With a final outcome of a 4.51mAh difference between the highest and lowest pack I was happy. So far the battery has been working flawless and super. This is not to discredit or poo poo others methods that have proven to work well and they are happy with their results. I just like to give someone the knowledge and option to think a little different and maybe it shows my anality or just plain stupidness.
However you build your packs, to ultimately come up with a successful and dependable battery, is up to you. You have however started your journey wisely by asking others what works for them.