Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Calling the contents of a random cell

Hi. I have a spread sheet with 90 values in cells L1 through L91.

I am using =int(rand()*91+1) to generate random integers from 1 to 91. I
then want cell C3 to display the contents of L** depending on which random
number was called (so if it give me 10, C3 should display the contents of
L10).

Could anyone tell me how is best to do this. I can't use nested IF
statements as I have too much information in the list.

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 55
Default Calling the contents of a random cell

=Indirect("L"&int(rand()*92))

"suitcase" wrote:

Hi. I have a spread sheet with 90 values in cells L1 through L91.

I am using =int(rand()*91+1) to generate random integers from 1 to 91. I
then want cell C3 to display the contents of L** depending on which random
number was called (so if it give me 10, C3 should display the contents of
L10).

Could anyone tell me how is best to do this. I can't use nested IF
statements as I have too much information in the list.

Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Calling the contents of a random cell

Just some thoughts....

=int(rand()*91+1)


Using that formula there is the high probability (almost a certainty!) of
getting duplicates.

You not really gaining anything by puting that formula in 91 cells and then
using a separate formula to randomly pick one of those cells.

Just use a single cell with the above formula and the net effect will be the
same.

--
Biff
Microsoft Excel MVP


"suitcase" wrote in message
...
Hi. I have a spread sheet with 90 values in cells L1 through L91.

I am using =int(rand()*91+1) to generate random integers from 1 to 91. I
then want cell C3 to display the contents of L** depending on which random
number was called (so if it give me 10, C3 should display the contents of
L10).

Could anyone tell me how is best to do this. I can't use nested IF
statements as I have too much information in the list.

Thanks.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,346
Default Calling the contents of a random cell

Hi,

Excel has a RANDBETWEEN(1,91) function which returns integers between the
lower and upper bound. It is part of the ATP - you can attach it by choosing
Tools, Add-ins, and check Analysis ToolPak.

To return the value at that location you have many options

=INDEX(L1:L91,RANDBETWEEN(1,91))
or
=OFFSET(A1,RANDBETWEEN(1,91)-1,)
or
=INDIRECT("L"&RANDBETWEEN(1,91))
--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"suitcase" wrote:

Hi. I have a spread sheet with 90 values in cells L1 through L91.

I am using =int(rand()*91+1) to generate random integers from 1 to 91. I
then want cell C3 to display the contents of L** depending on which random
number was called (so if it give me 10, C3 should display the contents of
L10).

Could anyone tell me how is best to do this. I can't use nested IF
statements as I have too much information in the list.

Thanks.

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
VLookup only calling one cell Alexander Excel Discussion (Misc queries) 3 September 21st 08 08:47 PM
Calling cell values from random sheets from a base sheet [email protected] Excel Worksheet Functions 2 January 19th 07 08:21 PM
Random scramble cell contents Max Excel Worksheet Functions 9 September 1st 06 05:24 PM
Some (somewhat random) cell contents not printing solcor Excel Discussion (Misc queries) 3 July 5th 06 11:43 PM
Calling procedure when leaving cell jeffP Excel Worksheet Functions 5 February 9th 06 08:59 AM


All times are GMT +1. The time now is 07:17 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"