View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dos Equis Dos Equis is offline
external usenet poster
 
Posts: 23
Default Spreading 1 large number evenly into several cells

Hi all,

I am trying to create a mailing organizing spread sheet that automates
my groups for bulk mailing.

My groups and numbers are

Zip Total 1 2 3 4 5
6 moved received
88001 46 11 11 12 12
88005 41 10 10 10 11
88007 18 15
3
88011 28 15 13
88012 12 12
880 22 11 14
3
ABQ 17 15
2
NM 14 15
1
MXD 64 11 11 10 11 11
11 1

Ordering is as follows:
Groups can have from 10 - 15 items as per USPS
Any Zip having more than will fit in that group (88007) has to have
extras moved to the next higher level of sort (880).

I am looking for a formula/macro which will divide the total number of
items in each zip into groups which meet my requirements. I prefer for
groups to remain as small as possible so I was thinking divide the
total by 10 and then divide the remainder among those groups. (46/10=4
groups, 2 of those get 1 extra and 2 get 2 extra items.)

Just not sure how to accomplish this. Any help would be appreciated.

Thank you,

Byron