#1   Report Post  
jdog
 
Posts: n/a
Default auto populate

I am trying to figure out how to take a list of names and fill a time slot
list randomly with those names. each name can only be used up to 2 times.
its around 14-16 names with 25 -35 slots.

Any suggestions
  #2   Report Post  
R. Choate
 
Posts: n/a
Default

Sounds like a homework problem. Are you trying to solve this with VBA or with formulas? How far have you gotten with it?

--
RMC,CPA


"jdog" wrote in message ...
I am trying to figure out how to take a list of names and fill a time slot
list randomly with those names. each name can only be used up to 2 times.
its around 14-16 names with 25 -35 slots.

Any suggestions


  #3   Report Post  
Bryan Hessey
 
Posts: n/a
Default auto populate


I agree that it sounds like homework / assignment, but possible is:

Assuming that your list of names is in B1 to B16, and that column A is
free.

insert
=rand()
in a1 to a32 (ie, twice the name range 14 to 16)

then use


=INDEX(B$1:B$16,IF(MATCH(SMALL(A$1:A$32,ROW()),A$1 :A$32,0)<17,MATCH(SMALL(A$1:A$32,ROW()),A$1:A$32,0 ),MATCH(SMALL(A$1:A$32,ROW()),A$1:A$32,0)-16))

- explained as Index (select) b1:b16 depending on:
use the smallest of A1 to A32 (minus 16 if applicable) according to
the current row number (thus the 5th row selects the 5th smallest)

This does not ensure that all names are used at least once.
It also is random and does not prevent a name being selected
consecutively.

Hope this helps.


R. Choate Wrote:
Sounds like a homework problem. Are you trying to solve this with VBA or
with formulas? How far have you gotten with it?

--
RMC,CPA


"jdog" wrote in message
...
I am trying to figure out how to take a list of names and fill a time
slot
list randomly with those names. each name can only be used up to 2
times.
its around 14-16 names with 25 -35 slots.

Any suggestions



--
Bryan Hessey
------------------------------------------------------------------------
Bryan Hessey's Profile: http://www.excelforum.com/member.php...o&userid=21059
View this thread: http://www.excelforum.com/showthread...hreadid=476507

  #4   Report Post  
B. R.Ramachandran
 
Posts: n/a
Default auto populate

Hi,

If you have 16 names and more than 32 time slots, some names WILL have to be
used more than twice. Let us imagine that you have 32 time slots and 16
names.

Place the time-slot-list in A1:A32 and the name-list in B1:B16.
Copy B1:B16 and paste onto B17:B32.
Create a helper column C1:C32 with random numbers. For this, in C1
enter
=RAND() and fill-down the formula to C32.
Copy the range C1:C32, "Edit"--"Paste Special"/"Values" onto C1:C12
itself.
Now select B1:C32 (i.e., the name and random number columns; do not
select column A) and sort by column C.

Regards,
B. R. Ramachandran


"jdog" wrote:

I am trying to figure out how to take a list of names and fill a time slot
list randomly with those names. each name can only be used up to 2 times.
its around 14-16 names with 25 -35 slots.

Any suggestions

  #5   Report Post  
Bernd Plumhoff
 
Posts: n/a
Default auto populate

Hello,

I suggest to take my UDF UniqRandInt() from www.sulprobil.com.

If your names are listed in A1:A16, for example, then select cells B1:B25
and enter
=INDEX(A1:A16,UniqRandInt(16,2))
as array-formula (with CTRL+SHIFT+ENTER).

Please keep in mind that my function returns an error value if the length of
your list is less than 16 * 2 as B. R. Ramachandran already pointed out.

HTH,
Bernd


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
Auto populate fields Mark Excel Discussion (Misc queries) 1 September 15th 05 08:45 PM
Function for Auto Populate [email protected] Excel Worksheet Functions 3 July 28th 05 03:26 AM
Auto populate cells based on 2 cells division. Chance224 Excel Discussion (Misc queries) 0 April 4th 05 09:35 PM
Auto Populate a cell Bellsouth Excel Discussion (Misc queries) 3 March 30th 05 02:27 PM
excel links update not working in auto, calculations in auto Mikey Boy Excel Worksheet Functions 0 December 7th 04 11:53 PM


All times are GMT +1. The time now is 12:25 AM.

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

About Us

"It's about Microsoft Excel"