Islam Gaber
New Member
- Joined
- Jan 11, 2023
- Messages
- 1
- Office Version
- 365
- Platform
- Windows
DISTRIBUTION | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | |||
1 | ||||||||||||||
2 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Total | |||
3 | 1 | 6 | 6 | 6 | 6 | 6 | 3 | 33 | ||||||
4 | 2 | 6 | 6 | 4 | 16 | |||||||||
5 | 3 | 6 | 6 | 6 | 6 | 1 | 25 | |||||||
6 | 4 | 6 | 6 | 6 | 6 | 6 | 6 | 6 | 2 | 44 | ||||
7 | 5 | 6 | 6 | 6 | 6 | 3 | 27 | |||||||
8 | ||||||||||||||
9 | ||||||||||||||
10 | ||||||||||||||
11 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Total | |||
12 | 1 | 6 | 6 | 6 | 6 | 6 | 3 | 33 | ||||||
13 | 2 | 6 | 6 | 4 | 16 | |||||||||
14 | 3 | 6 | 6 | 6 | 6 | 1 | 25 | |||||||
15 | 4 | 6 | 6 | 6 | 6 | 6 | 6 | 6 | 2 | 44 | ||||
16 | 5 | 6 | 6 | 6 | 6 | 3 | 27 | |||||||
Data |
Cell Formulas | ||
---|---|---|
Range | Formula | |
B3:B7 | B3 | =LET(val,L3,div,6,s,SEQUENCE(,IF(MOD(val,div)=0,val/div,INT(val/div)+1)),MAP(s,LAMBDA(x,IF(x*div<val,div,val-((x-1)*div))))) |
B12:B16 | B12 | =DISTRIBUTE(L12,6) |
Dynamic array formulas. |
LAMBDA.xlsm | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | |||
18 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Total | Num | |||
19 | 1 | 6 | 6 | 6 | 6 | 6 | 3 | 0 | 0 | 0 | 0 | 33 | 6 | ||
20 | 2 | 6 | 6 | 4 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 16 | 3 | ||
21 | 3 | 6 | 6 | 6 | 6 | 1 | 0 | 0 | 0 | 0 | 0 | 25 | 5 | ||
22 | 4 | 6 | 6 | 6 | 6 | 6 | 6 | 6 | 2 | 0 | 0 | 44 | 8 | ||
23 | 5 | 6 | 6 | 6 | 6 | 3 | 0 | 0 | 0 | 0 | 0 | 27 | 5 | ||
3a |
Cell Formulas | ||
---|---|---|
Range | Formula | |
B19:B23 | B19 | =MIN(6,L19) |
C19:K23 | C19 | =MIN(6,$L19-SUM($B19:B19)) |
M19:M23 | M19 | =COUNTIF(B19:K19,">0") |
=LAMBDA(
total,divisor,
LET(
val,total,
div,divisor,
s,SEQUENCE(,IF(MOD(val,div)=0,val/div,INT(val/div)+1)),
MAP(
s,
LAMBDA(x,
IF(x*div<val,
div,
val-((x-1)*div)
)
)
)
)
)
LAMBDA.xlsm | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | |||
18 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Total | Num | |||
19 | Order9 | 6 | 6 | 6 | 6 | 6 | 3 | 33 | 6 | ||||||
20 | Order10 | 6 | 6 | 4 | 16 | 3 | |||||||||
21 | Order11 | 6 | 6 | 6 | 6 | 1 | 25 | 5 | |||||||
22 | Order12 | 6 | 6 | 6 | 6 | 6 | 6 | 6 | 2 | 44 | 8 | ||||
23 | Order13 | 6 | 6 | 6 | 6 | 3 | 27 | 5 | |||||||
24 | Total | 30 | 30 | 28 | 24 | 16 | 9 | 6 | 2 | 145 | |||||
25 | |||||||||||||||
3a |
Cell Formulas | ||
---|---|---|
Range | Formula | |
B19:K23 | B19 | =MIN(6,$L19-SUM($A19:A19)) |
M19:M23 | M19 | =COUNTIF(B19:K19,">0") |
B24:L24 | B24 | =SUM(B19:B23) |