Skip to playerSkip to main contentSkip to footer
  • 6/2/2025
Discover how to generate unique random numbers in Excel. Essentially, how to generate random numbers in excel without duplicates within a range, with non repeating random number generator excel.
Using Excel to use to get number with no duplicates. Note that RANDBETWEEN() does not work for our purpose.

Excel provides a quick and efficient way to generate random unique numbers by using the SORTBY, SEQUENCE, and RANDARRAY functions. To begin, you can use the SEQUENCE function to create a list of sequential numbers in a column. Next, you can use the RANDARRAY function to generate a random array of numbers in another column. By using the SORTBY function, you can sort the sequential numbers based on the random array, which will result in a list of sequential numbers in random order. Finally, by using the UNIQUE function, you can extract a list of unique random numbers from the sorted list. This method is highly efficient as it avoids the need for complex formulas or VBA code and is ideal when you need to generate a list of unique random numbers quickly and efficiently.

Generate Random Numbers
=RANDBETWEEN(1,13)

Generate Unique Random Numbers
=SORTBY(SEQUENCE(13),RANDARRAY(13))

Here is the explanation of the formula.
1) In a cell, type =SEQUENCE(13) to generate a list of numbers from 1 to 13.
2) The =RANDARRAY(13) to generate an array of 13 random numbers between 0 and 1.
3) The =SORTBY(), reorganizes the sequence of numbers from SEQUENCE() based on number generated by RANDARRAY().

🔗🔗 LINKS TO SIMILIAR VIDEOS 🔗🔗
Calculate days remaining from today without weekends and statutory holidays in Excel - Excel Tips and Tricks
https://youtube.com/shorts/WXPhrRwfpsY?si=C6DDUAzoGrAFssv8

How do I calculate days remaining from today in Excel? - Excel Tips and Tricks
https://youtube.com/shorts/BuuGhktIjtc?si=dBhGrid1UzeFWwyY

Generate random dates in Excel - Excel Tips and Tricks
https://youtube.com/shorts/03wgMfz0S_4?si=aUsBgbDgdsEcQJ0T

Generate random dates excluding weekends and Statutory Holiday in Excel - Excel Tips and Tricks
https://youtube.com/shorts/I9OYxegi9SU?si=JpUa2eJVY4E33XK0

Generate random dates excluding weekends and Statutory Holiday in Excel - Excel Tips and Tricks - DETAIL EXPLANATION
https://youtu.be/ew60gnV72zY?si=4NXJUqfBgJdAp4Yd

How to Generate Unique Random Numbers in Excel - Excel Tips and Tricks
https://youtube.com/shorts/6KNctHs-TgM?si=F7xRASYt0UmJ4IwL

How do I generate a random price in Excel? How do I randomly generate 1000 numbers in Excel? - Excel Tips and Tricks
https://youtube.com/shorts/aa3OF0_v9C4?si=uBohKhgldJhicfP-

Generating Random Percentages - Excel Tips and Tricks
https://youtube.com/shorts/kixK3TvuuLY?si=mogPX7HtFbEszyFa

Generating Random Percentages in Excel... Alternate way - Excel Tips and Tricks
https://youtube.com/shorts/PVHgFmCLHNo?si=ehUYueX0pIOYDLMD
Transcript
00:00If you want to get a random number between 1 to 13, the reason why I said 13 is because I got 13
00:04products here, you use a function called ran between. And the first argument will be number
00:101 and 13 will be the last one here. Hit enter, it will generate a random number, happened to be 13.
00:16So and you apply the same formula right across the board. But the problem with this approach is
00:20that you can see they are not unique. 11 is repeated twice here, 2 is repeated twice and so on.
00:25That's another way to get around this and the formula for that will be this. Let me get rid
00:29of everything here. You start off by using a function called sort by. And the first argument is
00:34sequence. And basically you're generating a sequence of 13 numbers. So 1 to 13. And the second argument
00:41is a sorting by. We're going to have to use ran array. And this will generate 13 numbers. But this
00:47is numbers between 0 to 1. And basically sort it based on those numbers here. And you can see
00:53it generates 13 numbers and they're all unique.

Recommended