希望按扇区排序(左下)但均匀分布(右下):
Name |
Sector. |
Name. |
Sector |
A |
1 |
A |
1 |
B |
1 |
E |
2 |
C |
1 |
H |
3 |
D |
4 |
D |
4 |
E |
2 |
B |
1 |
F |
2 |
F |
2 |
G |
2 |
J |
3 |
H |
3 |
I |
4 |
I |
4 |
C |
1 |
J |
3 |
G |
2 |
实际数据有 70 多行,有 4 个扇区。
我已经手动解决了这个问题,但很想弄清楚如何使用 Excel 中的公式来完成它。
这是一个更完整(并且希望更准确)的想法 - carouselOrder 是我想通过公式生成的列。
guestID |
guestSector |
carouselOrder |
1 |
1 |
1 |
2 |
1 |
5 |
3 |
1 |
9 |
4 |
1 |
13 |
5 |
2 |
2 |
6 |
2 |
6 |
7 |
2 |
10 |
8 |
2 |
14 |
9 |
3 |
3 |
10 |
3 |
7 |
11 |
3 |
11 |
12 |
2 |
18 |
13 |
1 |
17 |
14 |
1 |
20 |
15 |
1 |
23 |
16 |
2 |
21 |
17 |
2 |
24 |
18 |
2 |
27 |
19 |
1 |
26 |
20 |
1 |
29 |
21 |
1 |
30 |
22 |
1 |
31 |
23 |
3 |
15 |
24 |
3 |
19 |
25 |
3 |
22 |
26 |
3 |
25 |
27 |
3 |
28 |
28 |
1 |
32 |
29 |
4 |
4 |
30 |
4 |
8 |
31 |
4 |
12 |
32 |
4 |
16 |
使用 Office 365 时,您可以使用以下内容D2
: =MOD(SEQUENCE(COUNTA(A2:A11),,0),4)+1
这将创建扇区 1 到 4 的重复计数器,以计算数据中的总行数。
In C2
使用以下内容:
=BYROW(D2#,LAMBDA(x,
INDEX(
FILTER($A$2:$A$11,$B$2:$B$11=x),
SUM(--(D$2:x=x)))))
This filters the Names that equal the sector of mentioned row and indexes it to show only the result where the row in the filter result equals the count of the same sector (D2#
) up to current row.
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)