Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
MaryEng
 
Posts: n/a
Default random numbers from a data of numbers?

Can anyone provide an effective Excel function for obtaining random numbers
based on a set of known random numbers?
  #2   Report Post  
Naz
 
Posts: n/a
Default

1) Randbetween(lower,upper) formula
2) if You have a list of random numbers u could put a number to the left of
that column and the create a vlookup based on a random number to pull back
that number

=vlookup(randbetween(1,6),$A$1:$A$6,2,false)

A B
1 R1
2 R2
3 R3
4 R4
5 R5
6 R6

IF you have something else in mind post back

_______________________
Naz,
London


"MaryEng" wrote:

Can anyone provide an effective Excel function for obtaining random numbers
based on a set of known random numbers?

  #3   Report Post  
JE McGimpsey
 
Posts: n/a
Default

Not sure what "obtaining random numbers based on a set of known random
numbers" means, exactly, but if you have a set of random numbers, you
can use the technique he

http://www.mcgimpsey.com/excel/randint.html

to get a random sampling of them.

Say your randoms were in A1:A100. You could get a random sample of 10 by
array-entering

=INDEX(A:A,RANDINT(1,100))

In article ,
"MaryEng" wrote:

Can anyone provide an effective Excel function for obtaining random numbers
based on a set of known random numbers?

  #4   Report Post  
JE McGimpsey
 
Posts: n/a
Default

Note that RANDBETWEEN() will not guarantee unique values.


In article ,
Naz wrote:

1) Randbetween(lower,upper) formula
2) if You have a list of random numbers u could put a number to the left of
that column and the create a vlookup based on a random number to pull back
that number

=vlookup(randbetween(1,6),$A$1:$A$6,2,false)

  #5   Report Post  
Bernd Plumhoff
 
Posts: n/a
Default

Your algorithm is still calculating nEnd - nStart + 1 random numbers and not
only the number of requested ones, I think.

I suggest to take my function UniqRandInt() at www.sulprobil.com.

Regards,
Bernd




  #6   Report Post  
JE McGimpsey
 
Posts: n/a
Default

No. When array-entered, the function returns the same number of ints as
cells.

Perhaps I should have been explicit that the formula I gave

=INDEX(A1:A100,RandInt(1,100))

should be entered in 10 cells, as shown in the example on the referenced
site?


In article ,
"Bernd Plumhoff" wrote:

Your algorithm is still calculating nEnd - nStart + 1 random numbers and not
only the number of requested ones, I think.

  #7   Report Post  
Bernd Plumhoff
 
Posts: n/a
Default

Sorry, but: yes.

Your algorithm CALCULATES nEnd - nStart + 1 random numbers and RETURNS the
number of requested random ints.

So, if you array-enter 10 cells with =RANDINT(1,1000000), for example, your
algorithm calculates 1,000,000 random ints and finally returns 10. That's not
necessary, I thought.

Regards,
Bernd
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
Sort pages? David Excel Discussion (Misc queries) 15 May 13th 05 11:33 PM
Match Last Occurrence of two numbers and Count to Previous Occurence Sam via OfficeKB.com Excel Worksheet Functions 33 April 4th 05 02:17 PM
converting copied data to numbers in excel xp knutsenk New Users to Excel 5 April 3rd 05 03:34 AM
can i copy data without row numbers? dave glynn Excel Discussion (Misc queries) 15 February 21st 05 01:59 AM
Help with data not getting plotted Scott Ehrlich Excel Discussion (Misc queries) 2 January 25th 05 06:17 AM


All times are GMT +1. The time now is 09:49 PM.

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"