Using the returned value to look up an item

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a random number from 1- 371
That points to a cell for example
Random number is 233
I want the value of the contents in cell B233

How can I do this
 
I have a random number from 1- 371
That points to a cell for example
Random number is 233
I want the value of the contents in cell B233

How can I do this

Try...

=INDEX(B:B,A2)

....where A2 cotains 233.

Hope this helps!
 
Not quite... Here is how it works

Sheet1
Table a contains an array 1-371 in cell A1-A371
Cells B1-B371 Contain the value I need

Now, I created a random number generator to give me a value of 1-371...
That's fine in Sheet2.

The next step would be to tell me what is the value of field Bx in Sheet1
if x is the random number created in Sheet2.

So for example if the random number generator gives me 233 then I want to
know the value of field Sheet1!B233 which is 201
 
So? Why don't you adapt JE's formula and add the sheet name to it


=INDEX(Sheet1!B:B,INT(RAND()*371)+1)


--


Regards,


Peo Sjoblom
 
Then one way:

If your random number generator' returns the value in Sheet2!J1, then do
a slight modification to my previous formula.

=INDEX(Sheet1!B:B,J1)
 
Back
Top