VLOOKUP and RAND question

D

deacs

Hi,

I have a question regarding the VLOOKUP, RAND, and maybe IF function
in Excel. I would greatly appreciate it if anyone can help with m
problem. I have 2 columns of data and would like to use a formula fo
Column 3.

Column 1 = numbers 1, 2, 3
Column 2 = numbers 500, 1000, 1500 associated with Column 1

I would like Column 3 to use the RAND function to randomnly pick fro
the numbers in Column 1, then return the value in Column 2. I'm no
sure how to do this.

Since there is equal probability of the numbers in Column 1 to appear
can I just use the RAND function for Column 2 and skip the first step
mentioned?

Thanks in advance
 
J

JE McGimpsey

As long as your numbers in column 2 are mapped 1 to 1 with numbers in
column 1 (e.g., no duplicates in column 1 with differing numbers in
column 2), you can use:

=INDEX(B:B,RAND()*COUNTA(B:B)+1)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top