Hi Eric - so i tried to tweak formula to give diff values based on grouping so changed formula for each group but it looks like it only works for first group so not 1 to 3 and not 5 to 7, 9 to 11 etc (starting point not right)
Lookup Table
Group | Sort By | Rand Start | Rand End |
0 - 3 Months | 1 | 1 | 3 |
3 - 6 Months | 2 | 5 | 7 |
6 - 12 Months | 3 | 9 | 11 |
1 - 2 Years | 4 | 13 | 15 |
2 - 4 years | 5 | 17 | 19 |
5 Years + | 6 | 21 | 23 |
Agent | Group | Value | Random Number |
A1 | 0 - 3 Months | 25.00% | 2 |
A9 | 0 - 3 Months | 25.00% | 1 |
A13 | 0 - 3 Months | 2.00% | 1 |
A21 | 0 - 3 Months | 21.00% | 2 |
A25 | 0 - 3 Months | 21.00% | 3 |
A33 | 0 - 3 Months | 27.00% | 2 |
A37 | 0 - 3 Months | 21.00% | 1 |
A45 | 0 - 3 Months | 11.00% | 3 |
A2 | 3 - 6 Months | 16.00% | 11 |
A10 | 3 - 6 Months | 21.00% | 10 |
A14 | 3 - 6 Months | 25.00% | 7 |
A22 | 3 - 6 Months | 21.00% | 5 |
A26 | 3 - 6 Months | 29.00% | 6 |
A34 | 3 - 6 Months | 7.00% | 9 |
A38 | 3 - 6 Months | 12.00% | 5 |
A46 | 3 - 6 Months | 13.00% | 8 |
A3 | 6 - 12 Months | 19.00% | 15 |
A11 | 6 - 12 Months | 2.00% | 11 |
A15 | 6 - 12 Months | 21.00% | 14 |
A23 | 6 - 12 Months | 9.00% | 13 |
A27 | 6 - 12 Months | 11.00% | 9 |
A35 | 6 - 12 Months | 8.00% | 10 |
A39 | 6 - 12 Months | 17.00% | 17 |
A47 | 6 - 12 Months | 3.00% | 18 |
Formulas used for each group(First Group)
=LET(a,COUNTA(R4:R11),SORTBY(INT(SEQUENCE(a,,INDEX($H$4:$H$9,MATCH(R4,$F$4:$F$9,0)),INDEX($I$4:$I$9,MATCH(R4,$F$4:$F$9,0))/a)),RANDARRAY(a)))
Should generate numbers from 1 to 3 equally
Second Group
=LET(a,COUNTA(R12:R19),SORTBY(INT(SEQUENCE(a,,INDEX($H$4:$H$9,MATCH(R12,$F$4:$F$9,0)),INDEX($I$4:$I$9,MATCH(R12,$F$4:$F$9,0))/a)),RANDARRAY(a)))
Should generate numbers from 5 to 7 equally which it aint
Third Group Etc
=LET(a,COUNTA(R20:R27),SORTBY(INT(SEQUENCE(a,,INDEX($H$4:$H$9,MATCH(R20,$F$4:$F$9,0)),INDEX($I$4:$I$9,MATCH(R20,$F$4:$F$9,0))/a)),RANDARRAY(a)))
Should generate numbers from 9 to 1 equally which it aint
etc