using random between formular

tonylpcs@yahoo.co.uk

Active Member
Joined
Dec 19, 2007
Messages
379
can someone give me a way to use the random between forulra "=RANDBETWEEN(B2,B3)" but to get it to not use the same number as it used in the cells above and below,

i.e if this is in cell D4 but its also doing the same in D3 and D2 to exclude those numbers?

been trying but cant get there!

thanks

Tony
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Upvote 0
This formula appears to work:
Excel Workbook
A
21
32
43
510
67
76
88
99
105
114
Sheet1
#VALUE!

You will need to change the A$1:A1 to whatever is the cell above where you are starting the data, so this formula cannot be put into row 1. Also there are other changes that would need to be made depending on size of the list and so forth.

Hope that helps.
 
Upvote 0
Thanks,

Its so close i can taste it, but still wrong!

Lets go back a little and I will explain in more detail.


the idea way for me to do this would be:
cell C3 has the start number i.e "1" and E3 has the finnish number i.e "10" (but finish number can change!)

in Cells D5 going down I have Cells that need to randomly pick a number between the lowerst Cell C3 and the highest Cell E3, but each cell must not have the same number as any other cell,

So whats in D5 must be excluded from D6 when it selects a number and what in D6 and D5 must be excluded from D7's list of numbers to choose from and so on

sounds simple doesnt it?

but can i get anything to work? not yet,

please help

Tony
 
Upvote 0
I think this is maybe what you are saying for your specific example:
Excel Workbook
ABCDE
1
2
3110
4
58
67
72
86
93
109
111
Sheet1
#VALUE!

Hope that helps. Here it also is with a little bit bigger number:
Excel Workbook
CDE
3120
4
51
62
73
812
96
109
1117
Sheet1
#VALUE!

I did try with a different starting number other than 1 and it did not work, so it would need to be modified if your starting number can be something other than 1?
 
Upvote 0
Actually this should work for any starting and finishing number:
Excel Workbook
ABCDE
1
2
3520
4
58
616
77
89
915
1014
1111
Sheet1
#VALUE!

Hope that helps.
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,292
Members
452,902
Latest member
Knuddeluff

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
Back
Top