This requires a simple macro. Do you want a space inbetween each group. How
do you want to assign a number? Write the number in column A? Need a little
more details to get it right.
No space needed. I have 500 lines that i need evenly divided in to 8 groups.
So line 1-62 is assigned group 1 (or # 1) 63-124 group 2 and so on... The
group number would be in Column A. Hope this is enough Details
> This requires a simple macro. Do you want a space inbetween each group. How
> do you want to assign a number? Write the number in column A? Need a little
> more details to get it right.
>
> > I need divide a list of 500 lines into groups of 8 and assign a number or
> > name to each group
Joel - 14 May 2008 18:08 GMT
Sub number_groups()
Const NumLines = 500
Const NumGroups = 8
GroupSize = Int(NumLines / NumGroups)
GroupNum = 1
For Lines = 1 To NumLines
GroupNum = WorksheetFunction.RoundUp(Lines / GroupSize, 0)
Range("A" & Lines) = GroupNum
Next Lines
End Sub
> No space needed. I have 500 lines that i need evenly divided in to 8 groups.
> So line 1-62 is assigned group 1 (or # 1) 63-124 group 2 and so on... The
[quoted text clipped - 6 lines]
> > > I need divide a list of 500 lines into groups of 8 and assign a number or
> > > name to each group