HELP! Custom Random NumberFunction in VBA

  • Thread starter Thread starter npl77
  • Start date Start date
N

npl77

I need help with this code.

1.)I need a VBA fnction that will take a fix set of numbers, scramble
them, and never use the same number 2 times.

Its gotta be simple, but Ive never worked with random generators in VBA
before.

Please send help to (e-mail address removed)

Thanks All.
 
put your numbers in column A
-----Original Message-----

I need help with this code.

1.)I need a VBA fnction that will take a fix set of numbers, scramble
them, and never use the same number 2 times.

Its gotta be simple, but Ive never worked with random
generators in VBA
in B put the value =RAND()
calc the sheet and sort the table by column B
since the values in B are random, the sort is random


Patrick Molloy
Microsoft Excel MVP
before.

Please send help to (e-mail address removed)

Thanks All.




------------------------------------------------

~~View and post usenet messages directly from http://www.ExcelForum.com/

~~Now Available: Financial Statements.xls, a step by
step guide to creating financial statements
 
If you have a spare range somewhere, then

- copy the values to the range
- assign the =RAND() formula to the adjoining cells
- or add a value returned by the VBA Rnd() function
- sort on the random numbers
- return the "sorted" numbers

Kevin Beckham
-----Original Message-----

I need help with this code.

1.)I need a VBA fnction that will take a fix set of numbers, scramble
them, and never use the same number 2 times.

Its gotta be simple, but Ive never worked with random generators in VBA
before.

Please send help to (e-mail address removed)

Thanks All.




------------------------------------------------

~~View and post usenet messages directly from http://www.ExcelForum.com/

~~Now Available: Financial Statements.xls, a step by step
guide to creating financial statements
 
Back
Top