View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Would I use "Lookup" to pick names for a Christmas grab bag

Here's one way...

Assume you have 20 names in the range A1:A20.

Enter this formula in B1 and copy down to B20:

=RAND()

Enter this formula in D1 and copy over to E1:

=INDEX($A:$A,MATCH(SMALL($B$1:$B$20,ROWS($1:1)+(CO LUMNS($A:A)-1)*10),$B$1:$B$20,0))

Select both D1 and E1 and copy down to row 10.

This will give you 10 random pairs of names.

Anytime the file recalculates you'll get a new "shuffle" of names. Once you
get the mix and are satisfied convert the formulas in D1:E10 to constants
and they won't shuffle anymore.

Select the range D1:E10
Goto the menu EditCopy
Then, EditPaste SpecialValuesOK

--
Biff
Microsoft Excel MVP


"Doebaby" wrote in message
...
Hi,

I am trying to create (what I thought was a small project) a Christmas
Grab
Bag, sort of speak. A person would type in his/her name and then the
computer
would randomly pick out one name of the people in the grab bag. I am
trying
to use vlookup but I don't know how to have the computer only pick the
name
once, with out using his/her own name. Does anyone have any ideas????
Below
is an example of what I am trying to do.

Joe
Mary
Bob
Jane
Enter your name: Joe
You Have: Bob

Is this way beyond something for excel??? It's way beyond me. I thought it
would work but I can't seem to find any functions to make this turn out.

Can someone please help?????