View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
CLR
 
Posts: n/a
Default Displaying a different value

Just put the =RAND() column next to the database and sort everything on it,
ascending or decending, then choose the top five rows ...........when the
sheet recaculates the RAND numbers will change, sort again and get five
different ones.........

hth
Vaya con Dios,
Chuck, CABGx3



"Mac" wrote:

Hi folks,

I'm running into some problems with a spreadsheet and was hoping
someone could point me in the right direction. What I need is a
spreadsheet with 3 columns for Employee #, First Name and Last name for
anywhere between 200 - 300 employees. From this list, I'm trying to
randomly select 5 Employee #'s, but have it display the first and last
name.

What I've tried already was making the IV column =RAND(), Column A is
Employee #, Column B is First Name and Column C is Last Name. Column E
has this formula in the first 5 cells:
=INDEX($A$2:$A$300,RANK($IV$2:$IV$300,$IV$2:$IV$30 0))

I'm running into 2 problems right now. First, the employee count can
fluctuate from 200 to 300 so some of the results could report back 0's
when it grabs a cell with no value. Secondly, it reports the Employee
# so you either have to scroll up and down until you match the # with
the name, or sort by the Employee # which refreshes the random results.

Is there a way to accomplish this, or am I hoping for too much doing
this through Excel?