Reputation: 293
Suppose I have the following table of users. How can I set groups of 5 as it appears in the group column? The idea is that each group contains 5 users.
user group
1 1
2 1
3 1
4 1
5 1
6 2
7 2
8 2
9 2
10 2
11 3
12 3
13 3
14 3
15 3
16 4
17 4
18 4
19 4
20 4
Upvotes: 2
Views: 73
Reputation: 11968
One more option:
=ArrayFormula(IF(LEN(A2:A),ROUNDUP((ROW(A2:A)-1)/5),""))
Upvotes: 2