Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Divide a list into Groups

I need divide a list of 500 lines into groups of 8 and assign a number or
name to each group
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default Divide a list into Groups

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.

"SerpentineFire" wrote:

I need divide a list of 500 lines into groups of 8 and assign a number or
name to each group

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Divide a list into Groups

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

"Joel" wrote:

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.

"SerpentineFire" wrote:

I need divide a list of 500 lines into groups of 8 and assign a number or
name to each group

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default Divide a list into Groups

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

"SerpentineFire" wrote:

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

"Joel" wrote:

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.

"SerpentineFire" wrote:

I need divide a list of 500 lines into groups of 8 and assign a number or
name to each group

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Want to divide a number into groups of thousands Ooley Excel Discussion (Misc queries) 3 August 24th 07 08:54 PM
List Sorted/Split into groups tay4432 Excel Worksheet Functions 0 June 29th 07 11:02 PM
Ranking a List which must be within GROUPS Gary Jordan Excel Discussion (Misc queries) 0 May 24th 06 02:06 PM
divide a large group of people into smaller groups by their vote siku Excel Discussion (Misc queries) 1 August 26th 05 05:42 PM
Excel formula divide list of #s by N to get a number above 40 JudyK Excel Discussion (Misc queries) 11 February 9th 05 08:51 PM


All times are GMT +1. The time now is 12:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"