In this article, we will learn how and where we can generate random numbers without repetition in Microsoft Excel.
We need the random numbers when we want to choose the lottery numbers. We need lottery numbers at so many places for admission, savings, etc.
To return the random numbers, avoiding duplicates, we will use Rand, Rank and VLOOKUP function along with row function. We use Rand function to select a set of 5 random numbers between 1 and 10, without getting duplicates.
Let’s take an example to understand.
We want to return lucky lottery numbers. So, to generate the lucky numbers, firstly, we will generate random numbers by using Rand function.
In data range A1:C11, Step 1:-
Note: - When we will do any activity in the sheet, every time rand function will change the random numbers.
Now, we will return the rank to every random number’s by using the Rank function.
As a result, 5 unique random numbers from 1 to 10 will be displayed in Column B. The numbers will change with each recalculation.
This is the way we can select a set of random numbers avoiding duplicates by using the formulae in Microsoft Excel.
If you liked our blogs, share it with your friends on Facebook. And also you can follow us on Twitter and Facebook.
We would love to hear from you, do let us know how we can improve, complement or innovate our work and make it better for you. Write us at email@example.com
The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.