ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   HELP! Custom Random NumberFunction in VBA (https://www.excelbanter.com/excel-programming/284380-help-custom-random-numberfunction-vba.html)

npl77

HELP! Custom Random NumberFunction in VBA
 

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

Thanks All.




------------------------------------------------
~~ Message posted from
http://www.ExcelTip.com/
~~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

patrick molloy

HELP! Custom Random NumberFunction in VBA
 
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

Thanks All.




------------------------------------------------
~~ Message posted from
http://www.ExcelTip.com/
~~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
.


Kevin Beckham

HELP! Custom Random NumberFunction in VBA
 
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

Thanks All.




------------------------------------------------
~~ Message posted from
http://www.ExcelTip.com/
~~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
.



All times are GMT +1. The time now is 01:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com