Is it possible???

byodog

New Member
Joined
Feb 23, 2009
Messages
9
I have 6 columns of numbers and I want to generate a random number in each column, but I want to restrict each column to a set range of numbers. Think of it like a lottery with total numbers 1-39, but since only certain numbers are the most likely to come up (say in column 1 only numbers 1-10 and column 2 numbers 5-15 and column 3 numbers 11-19 and so on) I want only randomize that range and direquard the other numbers. Also, if possible, not duplicate from one column to the next.
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop

wprager

Board Regular
Joined
Jul 29, 2008
Messages
141
The RAND() function will return a number between 0 and 1, so in order to get a number in the range X to Y you would write the function like this:

=X+(RAND()*(Y-X+1))

Be aware, though, that they aren't really random numbers, just pseudo random.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,152,110
Messages
5,768,156
Members
425,458
Latest member
Jaspal1996

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top