View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Martin[_21_] Martin[_21_] is offline
external usenet poster
 
Posts: 50
Default Distribution loop

Dear all,

I have 4 bags and 4 apples and want to put 1 apple in each bag. Easy.

However when I have 3 apples and want to put them in the first 3 bags out of
the 4 bags.

When I have 5 apples and want to put 4 into each bag and add the additional
apple to the first bag.

The number of apples and the number of bags can change from case to case.
For example I could have 10 apples and 6 bags, 3 apples and 10 bags etc

How do I do this? Can I do it in the spreadsheet or do I need to produce a
macro?

Any help highly appreciated.

--
Regards,

Martin