RandBetween(2,218) to generate 217 UNIQUE integers in 217 cells

mclau152

New Member
Joined
Jul 7, 2014
Messages
28
HELLO FORUMS,

I need to make 217 RANDOM integers in 217 CELLS that are UNIQUE (no duplicates)

NOW when I use this formula (=randbetween(2,218)) in my first cell and drag down I get many duplicates (found using conditional formatting)

HOW do I make these random integers WITHOUT getting duplicates

THANK YOU FORUMS
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
How about just putting the numbers in ascending, random numbers in the next column and sort on this.
 
Upvote 0
=rand() in A1
=RANK(A1,$A$1:$A$217)+1 in B1

drag them all the way down to Row 217.
 
Last edited:
Upvote 0
Getting unique random numbers from Randbetween is very difficult to say the least.

Here's an alternate method using RAND(), this will be unique.

Manually enter your numbers from 2 to 218 in your range of cells (you can just type 2 in the first cell, drag down and use Fill Series)
Then in the adjescent column put
=RAND()

Sort by the column with RAND() in it

Here's an example with just 10 numbers


Cell Formulas
RangeFormula
B1=RAND()
B2=RAND()
B3=RAND()
B4=RAND()
B5=RAND()
B6=RAND()
B7=RAND()
B8=RAND()
B9=RAND()
B10=RAND()
 
Last edited:
Upvote 0
HELLO AlanY,

this has worked so far, I have a list of random numbers now and conditional formatting isnt showing any duplicates

I will update if issues arise

THANK YOU
 
Upvote 0

Forum statistics

Threads
1,214,806
Messages
6,121,667
Members
449,045
Latest member
Marcus05

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