Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Using the returned value to look up an item

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

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default Using the returned value to look up an item

One way:

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

In article ,
Frankd410 wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 14
Default Using the returned value to look up an item

On Oct 31, 10:22 am, Frankd410
wrote:
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!

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Using the returned value to look up an item

="B"&RANDBETWEEN(1,371)

Required ATP add-ins


"Frankd410" wrote:

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

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default Using the returned value to look up an item

That just produces a text value, not the contents of the desired cell...

In article ,
Teethless mama wrote:

="B"&RANDBETWEEN(1,371)

Required ATP add-ins


"Frankd410" wrote:

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



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 256
Default Using the returned value to look up an item


=INDIRECT("B"&INT(RAND()*371)+1)


On Oct 31, 10:46 am, JE McGimpsey wrote:
That just produces a text value, not the contents of the desired cell...

In article ,
Teethless mama wrote:



="B"&RANDBETWEEN(1,371)


Required ATP add-ins


"Frankd410" wrote:


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- Hide quoted text -


- Show quoted text -



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Using the returned value to look up an item

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



"JE McGimpsey" wrote:

One way:

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

In article ,
Frankd410 wrote:

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


  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Using the returned value to look up an item

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


"Frankd410" wrote in message
...
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



"JE McGimpsey" wrote:

One way:

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

In article ,
Frankd410 wrote:

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




  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default Using the returned value to look up an item

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)




In article ,
Frankd410 wrote:

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



"JE McGimpsey" wrote:

One way:

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

In article ,
Frankd410 wrote:

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


  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 947
Default Using the returned value to look up an item

Maybe another option:

=OFFSET(B1,RANDBETWEEN(0,370),0,1,1)

--
Dana DeLouis


"Frankd410" wrote in message
...
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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
same name being returned Zombie0635 Excel Discussion (Misc queries) 8 October 26th 07 07:45 PM
#N/A value is returned Sai Excel Worksheet Functions 7 July 15th 07 11:05 PM
Item numbers result in item description in next field in Excel Cheryl MM Excel Worksheet Functions 1 February 20th 07 03:51 PM
Selecting an Item from a List and getting a different item to pop. Matt Excel Worksheet Functions 1 December 7th 04 02:37 PM
#Value! Returned ? John Excel Worksheet Functions 2 December 6th 04 08:55 PM


All times are GMT +1. The time now is 07:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"