Thread: VLOOKUP matches
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Sheeloo[_3_] Sheeloo[_3_] is offline
external usenet poster
 
Posts: 1,805
Default VLOOKUP matches

Use
=VLOOKUP(D1,A1:B150,2).

i.e. change A150 to B150

"REJesser" wrote:

I am attempting to create a Random Drug Screen Identifier. I can handle the
whole random number creation. What I haven't been able to figure out is how
can I have the name associated with the number identified. For example, I
have in the first column, the number 1. Each cell below counts up...=A1+1;
=A2+1, etc. The next column (B) is devoted to the last names of the
employees. The next is employee first names (C). Column D generates 10
random numbers from 1 to the total current number of employees. I can
certainly print out the list of employees and, by hand, highlight those
numbers which were generated. I would prefer the worksheet do that for me.
I have tried the VLOOKUP command... =VLOOKUP(D1,A1:A150,2). I had hoped that
this would actually list the name identified with the first random number.
The next number would be =VLOOKUP(D2,A1:A150,2) and so on. It ain't workin'.
Any help would be greatly appreciated.
Thanks.