Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 553
Default RAND() / RANDBETWEEN() FOR SPECIFIC ARRAY

How can one derive a random number from a specifc array, for example a random
selection from {2, 4, 16, 256, 65536}

--

Best Regards,
FARAZ A. QURESHI
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 913
Default RAND() / RANDBETWEEN() FOR SPECIFIC ARRAY

On Fri, 8 Aug 2008 23:38:00 -0700, FARAZ QURESHI
wrote:

How can one derive a random number from a specifc array, for example a random
selection from {2, 4, 16, 256, 65536}


Try this formula

=CHOOSE(RANDBETWEEN(1,5),2,4,16,256,65536)

Hope this helps / Lars-Åke
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,718
Default RAND() / RANDBETWEEN() FOR SPECIFIC ARRAY

=INDEX({2,4,16,256,65536},RANDBETWEEN(1,5))


"FARAZ QURESHI" wrote:

How can one derive a random number from a specifc array, for example a random
selection from {2, 4, 16, 256, 65536}

--

Best Regards,
FARAZ A. QURESHI

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 806
Default RAND() / RANDBETWEEN() FOR SPECIFIC ARRAY

=2^(2^INT(RND()*5))

Regards,
Bernd
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,345
Default RAND() / RANDBETWEEN() FOR SPECIFIC ARRAY

"Bernd P" wrote in message
...
=2^(2^INT(RND()*5))


Clever, I like it!

--

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk




  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 762
Default RAND() / RANDBETWEEN() FOR SPECIFIC ARRAY

FARAZ QURESHI -

What is the probability for each of the five distinct values?

Or, are the five values equally-likely?

- Mike Middleton
http://www.DecisionToolworks.com
Decision Analysis Add-ins for Excel



"FARAZ QURESHI" wrote in message
...
How can one derive a random number from a specifc array, for example a
random
selection from {2, 4, 16, 256, 65536}

--

Best Regards,
FARAZ A. QURESHI



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
how can i set up rand or rand between to give only -1 or 1? Uesiet Excel Worksheet Functions 8 October 27th 08 02:28 PM
Text lookup array and match specific data Fiona Excel Worksheet Functions 3 January 23rd 08 12:26 AM
Array Formula returns error but only for specific columns pblenis Excel Discussion (Misc queries) 3 March 9th 07 11:02 PM
How to return the row # of an expression in specific array of cell Rado Excel Worksheet Functions 2 June 27th 06 04:59 PM
How I can pick a specific value on an array in excel Paul Excel Discussion (Misc queries) 1 May 10th 05 07:38 PM


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