Randomly assign people to groups

Related functions .

File

To randomly assign people to groups or teams of equal size, you can use a formula based on the RANK and ROUNDUP functions. In the example shown, the formula in D5 is:

where groups (F5:F7) and randoms (C5:C22) are named ranges . As the formula is copied down, it returns a random group of "A", "B", or "C" on each row. In addition, the formula is configured to create groups of equal size.

Note: this problem can also be solved with a single Dynamic Array formula and no helper column. See below for details.

Generic formula

Explanation .

In this example, the goal is to randomly assign the names in column B to three groups of equal size. The group names are "A", "B", and "C", and these values appear in the named range  groups (F5:F7). The solution should automatically count the number of groups to assign and attempt to generate the same count for each group. The worksheet shown contains 18 names, the final result should be that each group includes 6 random names from the list. The article below explains two approaches: (1) a traditional formula that depends on random values in a helper column, which will work in any version of Excel, and (2) a  Dynamic Array formula that will return all random groups in one step without a helper column.

Basic approach

For both formulas explained below, the basic approach is the same and looks like this:

  • Generate random numbers for each row
  • Rank the random numbers
  • Count groups and calculate the ideal group size
  • Divide each rank by the group size
  • Round the results up to the nearest whole number
  • Use the whole number to fetch a group name with INDEX

The difference below is in the implementation. In older versions of Excel, we need to add a helper column that contains random numbers to the data, then use a formula that ranks each row according to the helper column. In the current version of Excel, we can use a single formula that generates all random numbers at once, and there is no need for a helper column.

Traditional formula

The traditional way to solve this problem in an older version of Excel is to use a helper column populated with random numbers with the  RAND function , as seen in the worksheet above. In the worksheet shown, the random numbers appear in the range C5:C22 which is named "randoms" for convenience. To generate a full set of random values in one step, select the range C5:C22 and type =RAND() in the formula bar. Then use the shortcut control + enter to enter the formula in all cells at once.

Note: the RAND function will keep generating random values every time a change is made to the worksheet, so typically you will want to replace the results in column C with actual values using paste special to prevent changes after random values are assigned.

Assigning groups with INDEX

The formula used to assign random groups looks like this:

At a high level, this formula uses the INDEX function to assign a group of "A", "B", or "C" to each name in the list. The generic pattern looks like this, where n is a number that corresponds to a group:

Because there are three groups total, the value for n needs to be between 1 and 3:

The hard part of the formula is generating a random number (n) for each row that will result in three groups of equal size. This is done in the snippet below, which makes up the bulk of the formula:

Working from the inside out, the first step is to assign a numeric rank to each random number with the  RANK function :

RANK compares the number in cell C5 to all values in C5:C22 and returns its position relative to the other numbers in the range. The smallest number gets rank 1, the next smallest rank 2, and so on. Because there are 18 numbers in the list, RANK will generate a rank of 1-18. The next part of the formula calculates the optimal size for each group by dividing the total number of rows in the data by the number of groups to assign:

The ROWS function returns a count of rows (18), and the  COUNTA function  returns a count of groups (3). Simplifying, we have:

The result is 6, which is the number of names that should be in each of the three groups. Next, the rank of each random number is divided by the number of names per group (6):

For example, when a row is ranked 1st, the formula would return a value of 1/6, or 0.1667, when a row has a rank of 6, the formula returns 1/1, or 1, and so on. This is the mechanism by which the formula generates groups of equal size. The final step is to use the  ROUNDUP function  to round each number up to the next whole number,  effectively dividing the ranked individuals into three equally sized groups based on their rank. The result from ROUNDUP is a random number between 1-3 (n) which is then used by INDEX to assign a group.

Dynamic Array formula

In Excel 2021 or later, dynamic array formulas allow a more sophisticated solution with an all-in-one formula that requires no helper columns. In the screen below, the formula in cell C5 is:

An all-in-one dynamic array formula to assign people to equal-sized groups

This formula uses the LET function to create named variables within the formula, which reduces complexity and improves readability. In the first part of the formula, four variables are defined as follows:

  • ct : The count of names, determined by ROWS(B5:B22) .
  • groups : The groups to be assigned in the range E5:E7 .
  • size : The size of each group, determined with  ct/COUNTA(groups)
  • randoms : A sorted list of random numbers created with SORTBY(SEQUENCE(ct), RANDARRAY(ct)) .

The definition of  randoms is the most interesting bit:

Since ct has been previously defined as 18, the  SEQUENCE function creates an array of sequential numbers between 1 and 18. The RANDARRAY function creates an array of random numbers of the same size. Next, the  SORTBY function  sorts the sequence in the order of the random numbers, effectively shuffling the sequence. The result is the numbers 1 to 18 in a random order.

With the variables above in place, the last line in the formula generates the random groups like this:

Like the original formula above, the basic pattern of this formula is:

where  n is a random number between 1 and 3, corresponding to the three groups. The 18 individual values for n are calculated in one step like this:

First, the numbers in randoms are divided by size  to get a decimal number corresponding to a group. Then they handed off to the ROUNDUP function which rounds the numbers up to the nearest whole number. The result from ROUNDUP is an array that contains 18 numbers between 1 and 3. This array is returned directly to INDEX as the row_num argument, and INDEX returns the corresponding 18 groups in one step. The final result is that each group contains 6 random names from the list.

Although both formulas explained above work well, the dynamic array formula keeps all operations in a single cell. There is no need for a helper column. In addition, the LET function allows us to define variables that can be reused in the formula without recalculation, which makes the formula easier to read and more efficient. The result is a dynamic and efficient way to assign individuals to random groups of equal size with a single formula.

Related formulas

Excel formula: Randomly assign data to groups

  • Randomly assign data to groups

Excel formula: Random text values

  • Random text values

Excel formula: Random number from fixed set of options

  • Random number from fixed set of options

Excel formula: Random numbers without duplicates

  • Random numbers without duplicates

Related functions

Excel INDEX function

  • INDEX Function

The Excel INDEX function returns the value at a given location in a range or array. You can use INDEX to retrieve individual values, or entire rows and columns. The MATCH function is often used together with INDEX to provide row and column numbers....

Excel RAND function

  • RAND Function

The Excel RAND function returns a random number between 0 and 1. For example, =RAND() will generate a number like 0.422245717. RAND recalculates when a worksheet is opened or changed.

Excel RANK function

  • RANK Function

The Excel RANK function returns the rank of a numeric value when compared to a list of other numeric values. RANK can rank values from largest to smallest (i.e. top sales) as well as smallest to largest (i.e. fastest time).

Excel ROUNDUP function

  • ROUNDUP Function

The Excel ROUNDUP function returns a number rounded up to a given number of decimal places. Unlike standard rounding, where only numbers less than 5 are rounded down, ROUNDUP rounds all numbers up ....

Excel SEQUENCE function

  • SEQUENCE Function

The Excel SEQUENCE function generates a list of sequential numbers in an array. The array can be one dimensional, or two-dimensional, determined by rows and columns  arguments. 

Excel RANDARRAY function

  • RANDARRAY Function

The Excel RANDARRAY function generates an array of random numbers between two values. The size or the array is specified by rows and columns arguments. The generated values can be either decimals or whole numbers.

Excel SORTBY function

  • SORTBY Function

The Excel SORTBY function sorts the contents of a range or array based on the values from another range or array. The range or array used to sort does not need to appear in results.

Excel LET function

  • LET Function

The Excel LET function lets you define named variables in a formula. There are two primary reasons you might want to do this: (1) to improve performance by eliminating redundant calculations and (2) to make more complex formulas easier to read and write....

Related videos

random assignment generator excel

  • How to randomly assign people to teams

Dave Bruns Profile Picture

Hi - I'm Dave Bruns, and I run Exceljet with my wife, Lisa. Our goal is to help you work faster in Excel. We create short videos, and clear examples of formulas, functions, pivot tables, conditional formatting, and charts.

Related Information

Get training, quick, clean, and to the point training.

Learn Excel with high quality video training. Our videos are quick, clean, and to the point, so you can learn Excel in less time, and easily review key topics when needed. Each video comes with its own practice worksheet.

Excel foundational video course

Help us improve Exceljet

Your email address is private and not shared.

Excel Dashboards

Excel Tutorial: How To Randomly Assign Participants To Groups In Excel

Introduction.

Randomly assigning participants to groups is a crucial aspect of conducting fair and unbiased research studies or creating balanced project teams. In this Excel tutorial , we will explore how to efficiently and accurately randomly assign participants to groups in Excel . By using Excel for this task, you can streamline the process, reduce human error, and ensure transparency in the group assignment process.

Key Takeaways

  • Randomly assigning participants to groups is crucial for fair and unbiased research studies or project teams.
  • Excel can streamline the process, reduce human error, and ensure transparency in group assignment.
  • Understanding randomization and its importance in creating unbiased groups is essential for valid research studies.
  • The RAND function in Excel can be used to generate random numbers for group assignment.
  • Exploring additional Excel functions for randomization can help in choosing the best method for specific research studies.

Understanding Randomization

Randomization is a crucial aspect of research methodology, especially in creating unbiased groups for research studies. This process plays a significant role in ensuring the validity and reliability of the results obtained. In this tutorial, we will explore the definition of randomization in the context of research, the importance of randomization in creating unbiased groups, and how random assignment contributes to the validity of research studies.

Randomization refers to the process of assigning participants to different groups in a random manner, ensuring that each individual has an equal chance of being placed in any of the groups. This approach eliminates the potential for bias and ensures that the groups are comparable at the baseline, allowing for more accurate comparisons during the analysis phase.

Randomization is essential in creating unbiased groups as it helps to minimize the impact of confounding variables and ensures that the treatment or intervention is the only factor influencing the outcomes. By randomly assigning participants to groups, researchers can reduce the potential for systematic differences between the groups, thereby improving the internal validity of the study.

Random assignment contributes to the validity of research studies by enhancing the internal and external validity of the results. Internal validity is improved as randomization helps to control for both known and unknown variables, reducing the likelihood of alternative explanations for the results. Additionally, random assignment also enhances external validity by increasing the generalizability of the findings to the larger population.

Using the RAND Function in Excel

When it comes to randomly assigning participants to groups in Excel, the RAND function can be a valuable tool. This function allows you to generate random numbers, which can then be used to allocate individuals to different groups. In this tutorial, we will explore the use of the RAND function in Excel and provide guidance on how to effectively utilize it for this purpose.

The RAND function is a built-in function in Excel that generates a random number between 0 and 1. Each time the worksheet is recalculated, a new random number is generated. This function is particularly useful for scenarios where random assignment is required, such as in the allocation of participants to different groups.

To use the RAND function to generate random numbers in Excel, simply enter the formula "=RAND()" into the cell where you want the random number to appear. You can then drag the fill handle down to copy the formula to additional cells, generating a new random number in each cell. This allows you to quickly and easily generate a set of random numbers for use in assigning participants to different groups.

  • Locking the random numbers: When using the RAND function to assign participants to groups, it is important to remember that the random numbers will change each time the worksheet is recalculated. To prevent this, you can use the "paste as values" option to lock the random numbers in place once they have been generated.
  • Using the random numbers for assignment: Once you have generated a set of random numbers using the RAND function, you can use these numbers to assign participants to different groups. For example, you can use conditional formatting or sorting to allocate individuals based on the random numbers generated.
  • Testing the random assignment: It is always a good idea to test the random assignment process before using it in a real-world scenario. You can do this by generating a set of random numbers, using them to assign individuals to groups, and then checking the distribution to ensure that it appears to be random and evenly distributed.

Assigning Participants to Groups

In many research studies or projects, it is necessary to randomly assign participants to different groups. Using Excel, you can easily accomplish this task by following a few simple steps.

A. Creating a column for random numbers in Excel

  • Open a new or existing Excel spreadsheet.
  • Select a column where you want to generate random numbers for each participant.
  • Enter the formula =RAND() in the first cell of the selected column and press Enter.
  • Drag the fill handle down to fill the cells in the column with random numbers.

B. Sorting the random numbers to create randomized groups

  • Select the range of random numbers you have generated.
  • Go to the "Data" tab and click on the "Sort" button.
  • In the Sort dialog box, choose the column containing the random numbers and select "Smallest to Largest" or "Largest to Smallest" depending on your preference.
  • Click "OK" to sort the random numbers in ascending or descending order.

C. Assigning participants to groups based on sorted random numbers

  • After sorting the random numbers, you will see a new order in which participants are now effectively randomized.
  • Create separate columns or tabs for each group you want to assign participants to.
  • Manually or using formulas, assign participants to different groups based on their position in the sorted list of random numbers.
  • For example, you can use the IF function to assign participants with random numbers in a certain range to a specific group.

By following these steps, you can easily and effectively assign participants to different groups in Excel, ensuring a fair and randomized distribution for your research or project.

Potential Issues and Solutions

A. Addressing potential issues with using the RAND function for randomization

  • 1. Non-reproducibility: One potential issue with using the RAND function in Excel for randomization is that the results are not reproducible. Every time the spreadsheet is recalculated, the RAND function generates a new set of random numbers, which can lead to different group assignments each time. This can be problematic if you need to ensure the same random assignment for a specific set of participants.
  • 2. Inability to control group sizes: Another limitation of the RAND function is that it does not allow for controlling the sizes of the groups that participants are assigned to. This can be an issue if you need to ensure that each group has an equal number of participants or if you need to allocate participants to different groups based on specific criteria.

B. Discussing alternative methods for random assignment in Excel

  • 1. Using the RANDBETWEEN function: An alternative to the RAND function is the RANDBETWEEN function, which allows you to generate random integers within a specified range. This can help address the issue of non-reproducibility, as you can fix the range of random numbers to ensure consistent results upon recalculation.
  • 2. Utilizing the INDEX and RANK functions: Another method for random assignment in Excel involves using the INDEX and RANK functions in combination. By ranking the participants' names or IDs and then using the INDEX function to assign them to different groups based on their rank, you can achieve a reproducible and controlled randomization process.

C. Providing tips for troubleshooting any issues that may arise

  • 1. Recalculate the spreadsheet: If you encounter issues with the random assignment, try recalculating the spreadsheet to generate a new set of random numbers. This can help address non-reproducibility and ensure consistency in the group assignments.
  • 2. Check for errors in formulas: Double-check the formulas and functions used for random assignment to ensure that they are correctly implemented. Errors in the formulas can lead to unexpected results and may require troubleshooting to rectify.
  • 3. Test the random assignment process: Before using the random assignment in Excel for actual participant grouping, test the process with a small sample of data to identify any potential issues or inconsistencies. This can help you refine the randomization method and ensure accurate group assignments.

Additional Excel Functions for Randomization

When it comes to randomizing participants in Excel, there are several functions that can be utilized to achieve this. While the RAND function is commonly used, there are other functions that can also be explored for randomization purposes.

Exploring other Excel functions that can be used for randomization

  • RANDBETWEEN: This function can be used to generate random integers within a specified range. It can be particularly useful when you need to assign participants to a specific number of groups.
  • RANDARRAY: Introduced in Excel 365, this function allows you to generate an array of random numbers. It provides more flexibility and control over the randomization process.
  • PERMUT: This function can be used to generate permutations of a set of numbers, which can be useful for creating randomized sequences.

Comparing the pros and cons of different randomization methods in Excel

Each of these functions has its own advantages and limitations when it comes to randomizing participants in Excel. It's important to weigh the pros and cons of each method before deciding which one to use for a specific research study.

  • RAND: The RAND function is simple and easy to use, but it may not provide the level of control needed for more complex randomization requirements.
  • RANDBETWEEN: This function allows for the generation of random integers within a specified range, offering more precision in assigning participants to groups.
  • RANDARRAY: With its capability to generate an array of random numbers, this function provides greater flexibility and control over the randomization process, but it's only available in Excel 365.
  • PERMUT: While the PERMUT function can be useful for generating randomized sequences, it may not be the most efficient method for simple group assignments.

Tips for choosing the best method for a specific research study

When deciding which randomization method to use in Excel, it's important to consider the specific requirements of the research study. Factors such as the number of participants, the number of groups, and the level of control needed over the randomization process will all influence the choice of function.

  • Consider the level of precision required in assigning participants to groups. If specific ranges or sequences are needed, RANDBETWEEN or RANDARRAY may be more suitable.
  • Assess the flexibility and control needed in the randomization process. For more complex randomization requirements, such as creating arrays of random numbers, RANDARRAY may be the best choice.
  • Take into account the version of Excel being used. If you have access to Excel 365, you can take advantage of the newer RANDARRAY function for greater flexibility and control over randomization.

Random assignment is crucial in research to ensure fairness and eliminate bias. Utilizing Excel for this purpose can streamline the process and provide an efficient way to randomly assign participants to groups.

  • Recap: Random assignment is important in research to ensure unbiased results.
  • Summary: Using Excel, the steps for randomly assigning participants to groups include inputting participant names, generating random numbers, and sorting them into groups.
  • Encouragement: I strongly encourage readers to utilize Excel for their randomization needs to simplify the process and ensure unbiased results in their research.

By following the steps outlined in this tutorial, researchers can confidently use Excel for their randomization needs, saving time and ensuring the reliability of their study results.

Excel Dashboard

Immediate Download

MAC & PC Compatible

Free Email Support

Related aticles

Mastering Excel Dashboards for Data Analysts

The Benefits of Excel Dashboards for Data Analysts

Exploring the Power of Real-Time Data Visualization with Excel Dashboards

Unlock the Power of Real-Time Data Visualization with Excel Dashboards

How to Connect Your Excel Dashboard to Other Platforms for More Focused Insights

Unlocking the Potential of Excel's Data Dashboard

10 Keys to Designing a Dashboard with Maximum Impact in Excel

Unleashing the Benefits of a Dashboard with Maximum Impact in Excel

Essential Features for Data Exploration in Excel Dashboards

Exploring Data Easily and Securely: Essential Features for Excel Dashboards

Real-Time Dashboard Updates in Excel

Unlock the Benefits of Real-Time Dashboard Updates in Excel

Interpreting Excel Dashboards: From Data to Action

Unleashing the Power of Excel Dashboards

Different Approaches to Excel Dashboard Design and Development

Understanding the Benefits and Challenges of Excel Dashboard Design and Development

Best Excel Dashboard Tips for Smarter Data Visualization

Leverage Your Data with Excel Dashboards

How to Create Effective Dashboards in Microsoft Excel

Crafting the Perfect Dashboard for Excel

Dashboards in Excel: Managing Data Analysis and Visualization

An Introduction to Excel Dashboards

Best Practices for Designing an Insightful Excel Dashboard

How to Create an Effective Excel Dashboard

  • Choosing a selection results in a full page refresh.

TrumpExcel Logo - Online Excel Tips & Tricks

Random Group Generator Template [FREE Download]

Picture of Sumit Bansal

If you’re a teacher or a trainer, creating groups of students/participants is a common task. For example, you may want to create groups to conduct a quiz or a team building activity.

And in most of the cases, you need these groups to be random.

Today, I am sharing a random group generator template that will make it super easy for you to create a group of students/participants.

All you need is the list of students or participants and specify how many groups you want to create.

Random Group Generator Template - Cover

Random Group Generator Template

Here is a demo of how this random group generator (or random team generator) template works:

The list of students/participants is in A2:A17. If you have a longer list, simply add the names in it.

Cell E2 has the number of groups that you want to create. Based on the number you enter, you would get the groups and the names in each group in columns G to P. As of now, I have created it this template for a maximum of 10 groups.

Once you have entered the number of groups you want in cell E2, click on the ‘Create Teams’ button to randomly generate the groups of names.

Download the Random Group Generator Template

How this Excel Template Works

There are a couple of cool Excel features and a few helper columns that make this random group generator template in Excel.

Here is how it is made:

Random Group Generator Template - Excel Table

  • In cell G2, this formula will pick up the rank from C2 and return the name at that position in the list.
  • In cell G3, it will pick the rank from C6 (which is 1 + 1*4, where 4 is the number of groups to be formed).
  • In cell G4, it will pick the rank from C10 (which is 1 + 2*4, where 4 is the number of groups to be formed).

Random Group Generator Template - Team Member

Since RANDBETWEEN function is volatile , it will automatically refresh every time you make a change in the worksheet. This may be undesirable as it will change the grouping every time.

To avoid this:

  • Go to File Options.
  • In the Excel Options dialog box, select formulas in the pane on the left.

Random Group Generator Template - Manual

Now the worksheet would not refresh until you force a refresh by hitting the F9 key.

But to make it look better, there is an orange button that does the refresh when you click it. There is a one-line VBA code at play here that gets executed whenever you click the button.

Here is how to insert this button:

Random Group Generator Template - VB

  • Close the VB Editor.

Random Group Generator Template - Shape insert

  • Format the button the way you want.

Now when you click on the button, the worksheet would recalculate and you would get a new grouping based on the number of groups you have specified.

Other Excel Templates You May Like:

  • Employee Leave/Vacation Tracker Template .
  • Employee Timesheet Calculator .
  • Excel To Do Lists Templates .
  • A collection of FREE Excel Templates .

You may also like the following Excel tutorials:

  • How to Generate Unique Random Numbers in Excel .
  • How to Run a Macro in Excel .
  • How to Create an Excel Dashboard .
  • How to Rank within Groups in Excel
  • How to Shuffle a List of Items/Names in Excel? 2 Easy Formulas!

Excel Ebook Subscribe

FREE EXCEL BOOK

Get 51 Excel Tips Ebook to skyrocket your productivity and get work done faster

Picture of Sumit Bansal

25 thoughts on “Random Group Generator Template [FREE Download]”

I need to add columns like, Last name, email address, Gender, City, and two more columns. Can you please guide me on how to work on the VBA so that I can use your template?

Is there any way to increase the max number of groups? I really need 15 groups! Please help… would be so great to use in my classroom.

I am sorry but the random team generator isn’t working correctly. It will pull duplicates about every 8th run. Conditional format for dups and you will see. Can it be fixed? I have trying but to no avail. Please advise. M

Thank you …i almost got here myself but couldn’t figure put how to add the names to the teams…awesome!

Thanks for the template! Is there a way to specify that I would want to have my samples distributed randomly across three groups (A,B,C) but have e.g. 80% of them in group-A, 10% in group-B and 10% in group-C?

Doesnt work, can anyone help. Why does the formual reference cell F if there is nothing in it?

You can help me to create a specific random match, is for a sport team, 6 teams with 3 members i need matching with rival teams and similar weight for the member or very close weight , please i pay you

This is a great tool. However I tried modifying it. But could’nt.

I just need 1 Team where I need to mention the no of members in cell E2 and it creates a team with Random Names. I am confident its a piece of cake for you.

Absolutely perfect but I need the absent function to work. I would love to this to randomly select 3 or 4 ball groups of golfers whilst we are on the tee. However we are never sure who is going to turn up hence the need to mark golfers absent from the master list and randomise the selection of the players who are there. Can anyone help???

Sorry this does not work very well. I have 40 teams and they have to be paired this goes no where needed for this program to work.

Hey there, Loved this! i ended up making a few alterations of my own, namely, put the generating function into VBA so that it stopped updating all the time, I added some arrows to increase/decrease the number of groups with a single click and also made a ‘secret’ tab where you could specify two people you didn’t want in the same group. I’d be happy to share it if you’re interested.

Hi Steve, Please do share how you worked on “secret” tab.

Is there a way to set group 1 to have 10 members, and the others to have like 7 ?

Cool trick, but i have one scenario. let’s say i have names(2 or more) that cannot be teamed together,is there any way to solve it?

Hi Sumit! This is amazing for my classroom thanks so much! Is there any way to increase the max number of groups? I really need 12 groups!

Dear Sumit,

I really enjoy using your random group generator for my classes (I created a tab for each class. It’s swift and easy to use.

Sometimes, however someone in a class is absent (visit to the dentist, etc.). If so, I have to alter the table, to remove the absent student.

It would be nice if there could be a column next to the student names where I could mark the absent student(s) (for example with a zero) , so he/she won’t be displayed in the generated groups.

Unfortunately I don’t have the programming skills to make that happen.

Someone else perhaps?

Greetings, Willem (Netherlands)

Thanks Willem.. Glad you liked it.

Here is a link to a new template that will allow you to mark a student as absent: https://www.dropbox.com/s/ys1mmwmbdy7eeb5/Random-Team-Generator-Template%20Absent.xlsm?dl=0

Hello… there is something wrong with the absent function in the worksheet…Even if I indicate that the student is absent, his name will still show in the generated teams list… Also, is there anyway to group 40 people into 2 groups… it seems that the template doesn’t support such a function… thanks and keep up the good work! 🙂

Hello, I was searching for an excel template to create random 4 man teams when I happened upon your template. I downloaded it and tested what I am trying to accomplish, but was having trouble when I found the above link. It gets me a step closer to what I am wanting to do, however, I am trying to accomplish the opposite. I have a list of 71, but I only want to include those I identify as opposed to excluding those that are identified. And I want the teams to be in multiples of 4, but I think if I identify the total number of teams, the template will provide me with teams of 3 or 4. So, I am wondering if a template is available that would provide the capability to include vs exclude? Thanks in advance for your help. Andy.

Thanks to both of you, Sumit and Rudra! Sumit, I enjoy your formulabased random generator. I have my ovn VBA-generator that I will continue using,but I learned a lot from your reallønn Nice formulas.

Rudra! I’ve never notised the easy way of changing calculation mode. I still miss a warning light when ExCeL is in manual mode. Forgetting to return to aut. Mode has caised me lot f extra work.

From the Custom Quick Access Toolbaar, add “Manual” to the Quick Access Toolbaar and it will show when in Manual mode.

Thanks Hennie, I’ve already adferd it to QAT.

Cool trick Sumit. Thanks for sharing. However there is a short cut to change calculation from ribbon itself. Just go to formula ribbon and click on Calculation Option.

Thanks for sharing Rudra.. That’s definitely the faster way to do this.

Leave a Comment Cancel reply

BEST EXCEL TUTORIALS

Best Excel Shortcuts

Conditional Formatting

Excel Skills

Creating a Pivot Table

Excel Tables

INDEX- MATCH Combo

Creating a Drop Down List

Recording a Macro

© TrumpExcel.com – Free Online Excel Training

DMCA.com Protection Status

Privacy Policy  | Sitemap

Twitter | Facebook | YouTube | Pinterest | Linkedin

Free-Excel-Tips-EBook-Sumit-Bansal-1.png

FREE EXCEL E-BOOK

Free Excel Tips EBook Sumit Bansal

How to Generate Random Groups in Excel (Formula)

- Written by Puneet

  • Random Groups with Random Size (CHOOSE + RANDBETWEEN)
  • Random Groups with Same Size (RAND + ROUND + RANK)

In both methods, we need to write a formula. And in this tutorial, we will learn both ways and understand them in detail.

In this example, you have a list of students with their names, and now you need to assign them a random group from north, south, east, and west.

Generating Random Groups in Excel

To write this formula, you can use the below steps:

  • First, in a cell, enter the CHOOSE function.
  • And in the first argument of the CHOOSE, which is index_num enter the RANDBETWEEN function.
  • Now, in the RANDBETWEEN, enter “1” as the bottom and “4” as the top. So you have four groups to get the result; that’s why you need to use 1 and 4 to create a range of random numbers.
  • Next, in the second argument of CHOOSE, enter the name of all four groups by using double quotation marks (“North”,”South”,”East”,”West”).
  • In the end, hit enter to get the result. And drag the formula up to the last name.

Note: RANBBETWEEN is a volatile function that updates itself when you change your worksheet.

How this Formula Works

To understand this formula, you need to split it into two parts: In the first part, we have RANDBETWEEN, which returns a random number between 1 to 4 (as we have four groups).

In the second part, we have CHOOSE function, which returns a value from the list you define using the index_number. When RANDBETWEEN returns a random number, CHOOSE returns the value from the list using that number.

When you have 3 in the index number, CHOOSE returns “East” in the result.

But there’s a Problem.

When you use this formula, there’s no same-size grouping. So you can see in the result that the groups assigned to the students are not of the same size.

This method is only proper when you don’t want to consider the group size; otherwise, you need to use the formula we will discuss next.

Generating Random Groups (Same Size)

To use this formula, you need to create a helper column with the RAND function to get the random number between 0 and 1, just like the following.

Note: RAND is also a volatile function that changes its value. And here, I’m going to convert the formula into values .

After that , enter a new column and the RANK function. Then, in the number argument, specify the random number from the B2; in the ref argument, use the entire range of random numbers.

It creates a unique ranking for all the 12 students you have on the list. Now , you need to divide this ranking by three, as you need to have three students in a single group.

Next , you need to use the ROUNDUP to round these rankings upwards.

After using ROUNDUP, you get an even size group where each group has the same number of students (12 students in the four groups with three students in each group). Then, again, use the CHOOSE to convert these number groups into group names.

Get the Excel File

Related formulas.

  • Create a Horizontal Filter in Excel
  • Create a Star Rating Template in Excel
  • Get File Name in Excel
  • Get Sheet Name in Excel
  • Quickly Generate Random Letters in Excel
  • Randomize a List (Random Sort) in Excel
  • Count Characters in Excel (Cell and Range)
  • Get File Path (Excel Formula)
  • Get the Value from a Cell
  • Compare Two Strings (Text)
  • Get the Domain from the Email ID
  • Extract Only Numbers from a Text (String)
  • Extract Text After and Before a Character in Excel
  • Back to the List of Excel Formulas

Leave a Comment Cancel reply

  • Kutools for Excel
  • Kutools for Outlook
  • Kutools for Word
  • Kutools for PowerPoint
  • Setup Made Simple
  • End User License Agreement
  • Get 4 Software Bundle
  • 60-Day Refund
  • Tips & Tricks for Excel (3000+)
  • Tips & Tricks for Outlook (1200+)
  • Tips & Tricks for Word (300+)
  • Excel Functions (498)
  • Excel Formulas (350)
  • Excel Charts
  • Outlook Tutorials
  • ExtendOffice GPT ExtendOffice GPT Assistant
  • About Us Our Team

Feature Tutorials

  • Search Search more
  • Retrieve License Lost License?
  • Report a Bug Bug Report
  • Forum Post in Forum
  • Contact Us 24/7 email

Explore the new, free version of Kutools for Outlook today!

Quickly generate random groups for list of data in Excel

Sometimes, you may want to randomly assign data to groups as screenshot 1 shown, or generate groups for a list of names as below screenshot 2 shown, but how can handle these jobs quickly? Actually, in Excel, you can use formulas to solve them easily.

Screenshot1 Screenshot2
   

Randomly assign data to groups

Generate random groups in a specified data size, download sample file.

If you want to randomly assign data to a specified number of groups, each group is allowed with different numbers of data, you can use the CHOOSE and RANDBETWEEN functions.

Select a blank cell next to the list you want to assign to random groups, copy or type this formula

=CHOOSE(RANDBETWEEN(1,3),"Group A","Group B","Group C ")

In the formula, (1, 3) indicates to group data into 3 groups, Group A, Group B and Group C are the texts will be displayed in formula cells which used to distinguish different groups.

doc random group 3

Then the list of data has been randomly assigned to groups, and each group may have different numbers of data.

The calculated results will not be fixed, they will be recalculated if there is any change to the workbook.

Supposing you are working with a worksheet which contains multiple duplicate records, and now you need to combine / merge the rows based on the same value and do some calculations, such as sum, average, count of the duplicate rows. With this of , you can quickly combine same values / same data or duplicate rows into appropriate cells. 
 

If you want to generate random groups for a list of data, and each group has a specified data size, you can use the ROUNDUP and RANK functions.

1. Firstly, you need a helper column to list some random data next to your data. Supposing in cell E2, type this formula

Then drag fill handle down to fill this formula to cells you use.

2. In the next column, supposing in cell F2, copy or type this formula

=ROUNDUP(RANK(E2,$E$2:$E$13)/4,0)

E2:E13 is the range that contains formula =RAND(), 4 is the number of data that you want each group contains.

doc random group 4

Click to download sample file

Other Popular Articles

Remove first or last n characters from a cell or string in Excel

Extract part of text string from cell in Excel?

Two Easy Ways to convert or import Word document contents to Excel worksheet

Calculate the absolute difference between two values/times in Excel

More articles

The Best Office Productivity Tools

Kutools for excel solves most of your problems, and increases your productivity by 80%.

  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range ...
  • Merge Cells/Rows/Columns and Keeping Data; Split Cells Content; Combine Duplicate Rows and Sum/Average ... Prevent Duplicate Cells; Compare Ranges ...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets , Check Boxes and more...
  • Favorite and Quickly Insert Formulas , Ranges, Charts and Pictures; Encrypt Cells with password; Create Mailing List and send emails...
  • Extract Text , Add Text, Remove by Position, Remove Space ; Create and Print Paging Subtotals; Convert Between Cells Content and Comments ...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets ; Merge Tables based on key columns; Split Data into Multiple Sheets ; Batch Convert xls, xlsx and PDF ...
  • Pivot Table Grouping by week number, day of week and more... Show Unlocked, Locked Cells by different colors; Highlight Cells That Have Formula/Name ...

Office Tab - brings tabbed interface to Office, and make your work much easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint , Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!

Maria

How-To Geek

How to randomize a list in microsoft excel.

4

Your changes have been saved

Email Is sent

Please verify your email address.

You’ve reached your account maximum for followed topics.

The Best Security Systems of 2024

I dropped spotify for deezer—the grass is mostly greener, use this browser emulator to relive the web of your youth, quick links, how excel's list randomization works, use rand to randomize list items in excel.

If you want to rearrange items in a list in random order, you can use Microsoft Excel's

function. The function generates random numbers , which allow you to then randomize your list items. Here's how to do that in your spreadsheet.

Related: How Computers Generate Random Numbers

In Microsoft Excel, you don't have a feature to randomize your list items in a click. Instead, you have to rely on the app's

function that generates a series of random numbers . You then use these random numbers as the base for randomizing your list.

Related: How to Generate Random Numbers in Microsoft Excel

Basically, you add the

function's column next to your list, so that you have a random number next to each item on your list. Then, you sort these random numbers in ascending or descending order, which causes your list items to rearrange, too.

Once your items are randomized, you may delete the

function column as you don't need it anymore.

To start the randomization process, first, open your spreadsheet with Microsoft Excel.

In your spreadsheet, select the row next to the first item on your list.

Click the row next to the first item on the list.

In the selected row, enter the following function and press Enter:

Enter the RAND function and press Enter.

In the cell where you typed the function, you will see a random number. To automatically fill random numbers next to each item on your list, then in this cell's bottom-right corner, double-click the small dot.

Select the small dot at the bottom-right corner of the cell.

You now have a random number next to each item on your list.

Random numbers automatically filled.

To begin randomizing your list items, in Excel's ribbon at the top , click the "Home" tab.

In the "Home" tab, click Sort & Filter > Sort Smallest to Largest. You may choose "Sort Largest to Smallest" as well if you want. It doesn't matter what option you choose as your list items are going to be randomized in either case.

Each time you want to rearrange your items in random order, select the "Sort Smallest to Largest" or "Sort Largest to Smallest" option.

Choose Sort & Filter > Sort Smallest to Largest.

Your random numbers will be sorted , and when this happens, Excel will put your list items in random order, too.

Randomize a list in Excel.

You now have your list in completely random order. Now that you don't need the generated random numbers anymore, get rid of them by right-clicking the column's letter at the top and choosing "Clear Contents."

Select "Clear Contents" from the menu.

And that's all there is to applying Excel's magic to come up with random list order.

If you use Google Sheets, you can generate random numbers in Sheets , too.

Related: How to Generate Random Numbers in Google Sheets

  • Microsoft Office
  • Microsoft Excel

AutomateExcel Logo

Return to List of Excel Functions

RAND Function Examples – Excel, VBA, & Google Sheets

random assignment generator excel

Editorial Team

random assignment generator excel

Reviewed by

Steve Rynearson

Download the example workbook

This tutorial demonstrates how to use the RAND Function in Excel to calculate a random number.

Rand Main Function

How to use the RAND Function in Excel:

The RAND function generates numbers (decimals) greater than 0 and lesser than 1.

Rand Ex 01

Note: RANDARRAY is a new function in Excel 2019 onwards and replaces the RAND function. But if you don’t have the latest version or need to send the file out for people who don’t have it yet, you still can use the RAND function for backwards compatibility.

Besides generating random numbers greater than 0 and lesser than 1, RANDARRAY allows you to choose how many rows and columns to place the random numbers, choose the minimum and maximum number instead of just 0 and 1, and even choose if you want whole numbers or decimals.

If you have Excel 2007 onwards, you can use RANDBETWEEN as well. Like RANDARRAY, it allows you to choose the minimum and maximum number instead of just 0 and 1. This example below shows random numbers between 1 and 100.

Rand Ex 02

Generate Whole Numbers within a Range

As mentioned, RANDARRAY and RANDBETWEEN do this easily. With RAND, you need to do it like this:

Rand Ex 03

The formula is basically =RAND()*(Maximum Number – Minimum Number) + Minimum Number. And wrap it with an INT to grab the integer.

Generate Random Dates or/and Time

If you know how dates and time are stored in Excel, the logic is going to be the same as above because they are stored as numbers. Just:

Rand Ex 04

Time is similar, except that it’s decimal instead of a whole number or integer. Hence, remove the INT:

Rand Ex 05

To have them both together, simply add them together:

Rand Ex 06

Retrieve a Random Field

If you simply need to randomize decimals, RAND is perfect by itself. Most of the time though, we want to retrieve a random field. To grab a random employee in B3:B7 for instance, you can use a RAND function to assign to each employee, and INDEX and RANK to grab a random employee:

Rand Ex 07

RAND function will randomize numbers in C3:C7. RANK compares the random number in cell C3 among C3:C7 and ranks the number in descending order. 0.0843531593276469 for instance, ranks as number 3 among C3:C7. INDEX grabs the particular row number 3 from B3:B7 and that’s Sebastian Thompson.

Press the F9 key and the RAND function will recalculate. The value of 0.180669763264754 in cell C3 is now ranked 5 among the numbers in C3:C7 and thus showing the 5 th row in B3:B7 and that’s Cairo Mccall.

Rand Ex 08

Do note that while it’s extremely unlikely for RAND function to generate a duplicate number, it’s still theoretically possible.

Retrieve a Random Field without Duplicates

To ensure there are no duplicates, add a COUNTIF to the formula.

Rand Ex 09

In the above eg, there are two instances of 0.834312895315874. Hence, they both rank the same at 5. With the COUNTIF minus 1 added, the first rank of 0.834312895315874 would be 5 + 1 -1 (5) and the second rank of 0.834312895315874 would be 5 + 2 – 1 (6) and thus pick up different rows.

RAND Function in Google Sheets

The RAND   Function works exactly the same in Google Sheets as in Excel:

Rand Google Function

AI Formula Generator

random assignment generator excel

Try for Free

  • Excel Help Bot
  • Formula Generator
  • Formula Explainer
  • VBA Code Generator
  • VBA Code Commenter
  • Excel Template Generator

Excel Practice Worksheet

practice excel worksheet

Practice Excel functions and formulas with our 100% free practice worksheets!

  • Automatically Graded Exercises
  • Learn Excel, Inside Excel!

Free Download

  • PRO Courses Guides New Tech Help Pro Expert Videos About wikiHow Pro Upgrade Sign In
  • EXPLORE Tech Help Pro About Us Random Article Quizzes Request a New Article Community Dashboard This Or That Game Happiness Hub Popular Categories Arts and Entertainment Artwork Books Movies Computers and Electronics Computers Phone Skills Technology Hacks Health Men's Health Mental Health Women's Health Relationships Dating Love Relationship Issues Hobbies and Crafts Crafts Drawing Games Education & Communication Communication Skills Personal Development Studying Personal Care and Style Fashion Hair Care Personal Hygiene Youth Personal Care School Stuff Dating All Categories Arts and Entertainment Finance and Business Home and Garden Relationship Quizzes Cars & Other Vehicles Food and Entertaining Personal Care and Style Sports and Fitness Computers and Electronics Health Pets and Animals Travel Education & Communication Hobbies and Crafts Philosophy and Religion Work World Family Life Holidays and Traditions Relationships Youth
  • Browse Articles
  • Learn Something New
  • Quizzes Hot
  • Happiness Hub
  • This Or That Game
  • Train Your Brain
  • Explore More
  • Support wikiHow
  • About wikiHow
  • Log in / Sign up
  • Education and Communications
  • Mathematics
  • Probability and Statistics

How to Create a Random Sample in Excel

Last Updated: January 23, 2024

Assembling the Data

Creating a random sample, sorting the sample.

This article was co-authored by wikiHow staff writer, Jack Lloyd . Jack Lloyd is a Technology Writer and Editor for wikiHow. He has over two years of experience writing and editing technology-related articles. He is technology enthusiast and an English teacher. This article has been viewed 456,695 times. Learn more...

This wikiHow teaches you how to generate a random selection from pre-existing data in Microsoft Excel. Random selections are useful for creating fair, non-biased samples of your data collection.

Step 1 Open the Microsoft Excel program.

  • Depending on the type of data you have, this process will vary. However, you should start all data in the "A" column.
  • For example: you might place your users' names in the "A" column and their responses to a survey (e.g., "yes" or "no") in the "B" column.

Step 4 Make sure you have all relevant data entered into your spreadsheet.

  • After doing this, any data that was in the "A" column will be relisted as being in the "B" column and so on.

Step 3 Select the new

  • If Excel attempts to automatically format your "RAND" command, delete the formatting and re-type the command.

Step 5 Press ↵ Enter.

  • For a Mac, you'll hold down ⌘ Command instead of Control .
  • You can also right-click the "RAND" cell and then select Copy .

Step 8 Select the cell below your random sample number.

  • Clicking the "A1" cell and highlighting from there can cause a sorting error.

Step 9 Highlight the rest of the random sample cells.

  • For example, if your data in columns "B" and "C" extends all the way down to cell 100, you would hold down ⇧ Shift and click "A100" to select all "A" cells from A2 to A100.

Step 10 Hold down Control and tap V.

  • Again, Mac users will need to hold down ⌘ Command instead of Control .

Step 1 Select the top left cell.

  • This includes the random sample numbers to the left of your data as well.

Step 2 Hold down ⇧ Shift and select the bottom right cell.

  • For example, if your data takes up two columns of 50 cells each, you would select "C50" while holding down ⇧ Shift .
  • You can also click and drag your cursor from the top left corner to the bottom right corner of your data (or vice versa) to highlight it.

Step 3 Right-click your data.

  • If you're using a Mac, you can click using two fingers (or hold down Ctrl and click) to bring up the context menu.

Step 4 Hover your cursor over Sort.

  • Select the first, last, or middle half of the data . If your number of data points is too large to warrant this, you can also settle on a lower fraction (for example, the first eighth of the data).
  • Select all odd- or even-numbered data . For example, in a set of 10 data points, you would either pick numbers 1, 3, 5, 7, and 9, or 2, 4, 6, 8, and 10.
  • Select a number of random data points . This method works best for large sets of data where picking half of the information is too ambitious.

Step 7 Choose your random sample participants.

Community Q&A

Community Answer

  • If you don't have Microsoft Excel , there are other free programs online (such as Google Sheets or Outlook's Excel app) that may allow you to create a random sample. Thanks Helpful 0 Not Helpful 0
  • Microsoft makes an Excel app for iPhone and Android platforms so you can create spreadsheets on-the-go. Thanks Helpful 0 Not Helpful 0

random assignment generator excel

  • Failing to use a random sample when looking for results (e.g., sending out a survey after updating a service) may cause your answers to be biased--and, therefore, inaccurate. Thanks Helpful 0 Not Helpful 0

You Might Also Like

Make a Spreadsheet in Excel

About This Article

Jack Lloyd

  • Send fan mail to authors

Is this article up to date?

Do I Have a Dirty Mind Quiz

Featured Articles

How to Start and Keep a Text Conversation Going

Trending Articles

How to Do Nice Things for Your Parents & Show Your Appreciation

Watch Articles

Make Body Oil

  • Terms of Use
  • Privacy Policy
  • Do Not Sell or Share My Info
  • Not Selling Info

wikiHow Tech Help Pro:

Level up your tech skills and stay ahead of the curve

Statology

How to Select a Random Sample in Excel (Step-by-Step)

Often you may want to select a random sample from a dataset in Excel. Fortunately this is easy to do using the  RAND() function, which generates a random number between 0 and 1.

This tutorial provides a step-by-step example of how to use this function to select a random sample in Excel.

Step 1: Create a Dataset

First, enter the values of your dataset into a single column. For this example, we’ll enter 20 different values in column A:

random assignment generator excel

Step 2: Create a List of Random Values

Next, type  =RAND() into cell B2. This creates a random value between 0 and 1.

Next, hover over the bottom right corner of cell B2 until a tiny  + appears and then double click. This will copy the  =RAND() formula down to all of the remaining cells in column B:

random assignment generator excel

Step 3: Copy & Paste the Random Values

Next, highlight the values in column B and click Ctrl + C . This will copy all of the values. Next, right click on cell C2 and choose  Paste Values .

Note that the values in column B may change once you do this, but don’t worry about this.

random assignment generator excel

Lastly, highlight the values in column C and drag them to replace the values in column B.

A popup box will appear that says “There’s already data here. Do you want to replace it?” Click OK .

random assignment generator excel

Step 4: Sort by the Random Values

Next, highlight cells A1:B21. Then click the Data tab along the top ribbon, then click  Sort within the  Sort & Filter  section. Sort the values by  Random Number  smallest to largest.

The values will be sorted based on the random number, from smallest to largest:

Random sample in Excel

Step 5: Select the Random Sample

Lastly, choose the first  n  rows to be in your random sample. For example, if you want a random sample of size 5, then choose the first 5 raw data values to be included in your sample.

In this example, our random sample would include the first 5 values: 8, 18, 26, 24, 24.

Select a random sample in Excel

Featured Posts

random assignment generator excel

Hey there. My name is Zach Bobbitt. I have a Masters of Science degree in Applied Statistics and I’ve worked on machine learning algorithms for professional businesses in both healthcare and retail. I’m passionate about statistics, machine learning, and data visualization and I created Statology to be a resource for both students and teachers alike.  My goal with this site is to help you learn statistics through using simple terms, plenty of real-world examples, and helpful illustrations.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Join the Statology Community

Sign up to receive Statology's exclusive study resource: 100 practice problems with step-by-step solutions. Plus, get our latest insights, tutorials, and data analysis tips straight to your inbox!

By subscribing you accept Statology's Privacy Policy.

  • Ablebits blog
  • Random data

How to get random sample in Excel without duplicates

Svetlana Cheusheva

The tutorial focuses on how to do random sampling in Excel with no repeats. You will find solutions for Excel 365, Excel 2021, Excel 2019 and earlier versions.

A while ago, we described a few different ways to randomly select in Excel . Most of those solutions rely on the RAND and RANDBETWEEN functions, which may generate duplicate numbers. Consequently, your random sample might contain repeating values. If you need a random selection without duplicates, then use the approaches described in this tutorial.

Excel random selection from list with no duplicates

Only works in Excel 365 and Excel 2021 that support dynamic arrays.

To make a random selection from a list with no repeats, use this generic formula:

Where n is the desired selection size.

For example, to get 5 unique random names from the list in A2:A10, here's the formula to use:

=INDEX(SORTBY(A2:A10, RANDARRAY(ROWS(A2:A10))), SEQUENCE(5))

For the sake of convenience, you can input the sample size in a predefined cell, say C2, and supply the cell reference to the SEQUENCE function:

Excel random selection from list with no duplicates

How this formula works:

Here's a high-level explanation of the formula's logic: the RANDARRAY function creates an array of random numbers, SORTBY sorts the original values by those numbers, and INDEX retrieves as many values as specified by SEQUENCE.

A detailed breakdown follows below:

The ROWS function counts how many rows your data set contains and passes the count to the RANDARRAY function, so it can generate the same number of random decimals:

RANDARRAY(ROWS(A2:C10))

This array of random decimals is used as the "sort by" array by the SORTBY function. As the result, your original data gets shuffled randomly.

Select random rows in Excel without duplicates

To select random rows with no repeats, build a formula in this way:

Where n is the sample size and {1,2,…} are column numbers to extract.

As an example, let's select random rows from A2:C10 without duplicate entries, based on the sample size in F1. As our data is in 3 columns, we supply this array constant to the formula: {1,2,3}

=INDEX(SORTBY(A2:C10, RANDARRAY(ROWS(A2:C10))), SEQUENCE(F1), {1,2,3})

Selecting random rows in Excel without duplicates

How to do random sampling in Excel 2010 - 2019

As only Excel for Microsoft 365 and Excel 2021 support dynamic arrays, the dynamic array functions used in the previous examples only work in Excel 365. For other versions, you'll have to work out a different solution.

Supposing you want a random selection from the list in A2:A10. This can be done with 2 separate formulas:

=INDEX($A$2:$A$10, RANK.EQ(B2, $B$2:$B$10) + COUNTIF($B$2:B2, B2) - 1)

  • Copy the above formula to as many cells as many random values you want to pick. In this example, we want 4 names, so we copy the formula from E2 through E5.

Random sampling in Excel 2010 - 2019 with no repeats

Like in the first example, you use the INDEX function to retrieve values from column A based on random row numbers. The difference is in how you get those numbers:

The RAND function fills the range B2:B10 with random decimals.

The RANK.EQ function calculates the rank of a random number in a given row. For example, in E2, RANK.EQ(B2, $B$2:$B$10) ranks the number in B2 against all the numbers in B2:B10. When copied to E3, the relative reference B2 changes to B3 and returns the rank of the number in B3, and so on.

The COUNTIF function finds how many occurrences of a given number there are in the above cells. For instance, in E2, COUNTIF($B$2:B2, B2) checks just one cell - B2 itself, and returns 1. In E5, the formula changes to COUNTIF($B$2:B5, B5) and returns 2, because B5 contains the same value as B2 (please note, this is only to better explain the formula's logic; on a small dataset, chances to get duplicate random numbers are close to zero).

As the result, for all 1st occurrences, COUNTIF returns 1, from which you subtract 1 to keep the original ranking. For 2nd occurrences, COUNTIF returns 2. By subtracting 1 you increment the ranking by 1, thus preventing duplicate ranks.

For example, for B2, RANK.EQ returns 1. As this is the first occurrence, COUNTIF also returns 1. RANK.EQ + COUNTIF gives 2. And - 1 restores the rank 1.

Now, see what happens in case of the 2 nd occurrence. For B5, RANK.EQ also returns 1 while COUNTIF returns 2. Adding these up gives 3, from which you subtract 1. As the final result, you get 2, which represents the rank of the number in B5.

How to prevent Excel random sample from changing

As all randomizing functions in Excel such as RAND, RANDBETWEEN and RANDARRAY are volatile, they recalculate with every change on the worksheet. As the result, your random sample will be continuously changing. To prevent this from happening, use the Paste Special > Values feature to replace formulas with static values. For this, carry out these steps:

  • Select all the cells with your formula (any formula containing RAND, RANDBETWEEN or RANDARRAY function) and press Ctrl + C to copy them.
  • Right click the selected range and click Paste Special > Values . Alternatively, press Shift + F10 and then V , which is the shortcut for the above-mentioned feature.

Excel random selection: rows, columns or cells

Works in all versions of Excel 365 through Excel 2010.

If you have our Ultimate Suite installed in your Excel, then you can do random sampling with a mouse click instead of a formula. Here's how:

  • On the Ablebits Tools tab, click Randomize > Select Randomly .
  • Select the range from which you want to pick a sample.
  • Choose whether you want to select random rows, columns, or cells.
  • Define the sample size: that can be a percentage or number.
  • Click the Select button.

Selecting a random sample directly in the dataset

That's how to select a random sample in Excel without duplicates. I thank you for reading and hope to see you on our blog next week!

Available downloads

You may also be interested in.

  • How to generate random numbers in Excel
  • How to randomly select in Excel
  • How to sort randomly in Excel
  • RANDARRAY function to generate random numbers in Excel
  • How to prevent duplicates in a column in Excel

Table of contents

Ablebits.com website logo

14 comments

random assignment generator excel

I'm using this successfully but would like to also add a version of the formula that randomly samples (still without duplicates) but ONLY IF MULTIPLE CRITERIA are met in the corresponding cell in the same row.

This is the formula I'm using

=INDEX(SORTBY(MOICs!$P$21:$P$1193, RANDARRAY(ROWS(MOICs!$P$21:$P$1193))), SEQUENCE($C$11))

For instance, if there's a value in the row P in the sample range that DOES NOT have the correct criteria in the corresponding value in column X, then it should NOT be in the pool to sample from.

Any suggestions?

random assignment generator excel

Hi! Use the FILTER function to get a list of values that match a certain criterion. From this list, create random samples. For example,

=INDEX(SORTBY(FILTER(A2:A10,B2:B10=1), RANDARRAY(ROWS(FILTER(A2:A10,B2:B10=1)))), SEQUENCE(D1))

For more information, please visit: Excel FILTER function - dynamic filtering with formulas .

random assignment generator excel

Thank you for posting this formula.

random assignment generator excel

INDEX(SORTBY(M4:N99, RANDARRAY(ROWS(M4:N99))), SEQUENCE(30),{13,14})

I get #REF error.

random assignment generator excel

this example helps me a lot! thank you.

just one more question, how to make a duplicate data based on given "X" repeat value after then the those duplicated data must NOT show in sequential. Data 1 = 3 repeat Data 2 = 2 repeat

Data 1 Data 2 Data 1 Data 1 Data 2

I'm using excel 365. Thank you in advance.

random assignment generator excel

How do I pick numbers randomly in excel without repeating the same number? For example; from a range of 1 to 200

Hello! In the formula recommended in the article above, replace cell references with row numbers.

=INDEX(SORTBY(ROW(A1:A200), RANDARRAY(ROWS(A1:A200))), SEQUENCE(50))

random assignment generator excel

Hi- The blow formula works for me but i need to change the the table range everytime to go the last cell with value. how do you make the formula to automatically consider the last cell with value in the source table? Thanks!

I am using the RandArray function to pull 25 random, non-duplicated numbers from a list of 43 numbers (11 to 53). My function is: =RANDARRAY(5,5,11,53,TRUE)

Each time the function generatesone (sometimes two) duplicate set of numbers! Any idea why that might happen?

Hi, I don't know why you didn't use the recommendation from the article above. If you are using the RANDARRAY function, then pay attention to this article - How to generate random numbers without duplicates . I hope my advice will help you solve your task.

random assignment generator excel

Can I select Random records without duplicates using criteria.

Cell A1 & Cell A2 have the color Blue typed in I have a formula that will randomly select an item based on color. My issue is if I want to pick 2 or 3 blue items randomly how can i prevent duplicate values being selected in the second or third formula? I just want unique values

Cell A1 Cell B1 Blue Shirt

Cell A2 Cell B2 Blue Shirt (How can i prevent this from being what was selected in cell B1?)

Cell A3 Cell B3 Blue Shirt (How can I prevent this from being what was selected in Cells B1 and B2?)

Cell A5 (Color Field) Cell B5 (Item Field) Blue Shirt Blue Ball Red Shirt Red Bat Green Pants Green Shoes Blue Hat Blue Glove Blue Box

Hello! You did not specify which formula you used and what problems appeared.For me to be able to help you better, please specify which formula you mean and describe the problem in more detail. Perhaps our other instruction, how to randomly select in Excel without duplicates , will also help you.

random assignment generator excel

This formula working very well, can we use this formula with if function Like We have 3 columns & we need sample list with single name for other 2 column

Hi! What formula are you talking about?

Post a comment

ExcelDemy

How to Select a Random Sample in Excel (4 Methods)

Avatar photo

Method 1: Using the Data Analysis Toolbar to Select Random Sample

  • Go to the Data tab in the ribbon and select the  Data Analysis tool.

How to Select Random Sample in Excel

A Data Analysis window will appear.

  • Select Sampling as Analysis Tools .
  • Click on OK .

random assignment generator excel

A Sampling window will appear.

  • Select the Input Range from C3 to C12 , in the Number of Sample box, we will type 5
  • In the Output Range , select cells from E3 to E7  and click OK .

random assignment generator excel

We can see 5 random salaries in the Random 5 Salary column.

random assignment generator excel

Method 2 – Using the  RAND Function

➤ Enter the following formula in cell D3:

Here, the RAND function returns in cell D3 with a random number.

  • Press ENTER .

random assignment generator excel

We can see a random number in cell D3 .

  • Drag down the formula with the Fill Handle tool.

random assignment generator excel

We can see random numbers in the Random Number column.

How to Select Random Sample in Excel

Now, we want only values in the Random Number column.

  • Select from cell D3 to D12 .
  • Click on Copy .

random assignment generator excel

Now, we will paste the copied number into the same cells.

  • Select from cell D3 to D12 , and right-click.
  • Click on Paste Special and click on Paste Values .

random assignment generator excel

We can see in the Random Number column that there is no formula in the formula bar.

Tere are only values in the Random Number column.

random assignment generator excel

  • Select our entire dataset, and go to the Home tab.
  • Select Editing > Sort & Filte r> Custom Sort .

random assignment generator excel

A Sort window will appear.

  • Select Sort by as Random Number , and Order as Largest to Smallest .

random assignment generator excel

We can see the sorted Name and Salary according to the largest to smallest Random Number .

random assignment generator excel

  • Select the top 5 Name and Salary , and right click on the mouse.
  • Select Copy.

random assignment generator excel

  • Paste the top 5 Name and Salary in columns F and G .

How to Select Random Sample in Excel

Method 3 – Using INDEX, RANDBETWEEN and ROWS Functions

  • Enter the following function in cell E3 .
  • ROWS($B$3:$B$17) → Returns number of rows between cells B3 to B17 .
  • RANDBETWEEN(1,ROWS($B$3:$B$17)) → Returns a random number between 1 and number of rows.
  • INDEX($B$3:$B$12, RANK(D3,$D$3:$D$12), 1) → The number returned by RANDBETWEEN is fed to the row_num argument of the INDEX function, so it picks the value from that row. In the column_num argument, we supply 1 because we want to extract a value from the first column.

How to Select Random Sample in Excel

We can see a random name Robb in our Single Random Name column.

How to Select Random Sample in Excel

Read More: Random Selection Based on Criteria in Excel

Method 4 – Select Random Sample without Duplicates

  • Enter the following formula in cell D3 .

➤ Press ENTER .

How to Select Random Sample in Excel

  • Copy the formula with the Fill Handle tool.

random assignment generator excel

  • Enter the following formula in cell E3:
  • RAND() →Returns column D with random numbers.
  • RANK(D3,$D$3:$D$12) → Returns the rank of a random number in the same row. For example, RANK(D3,$D$3:$D$12) in cell E3 gets the rank of the number in D3 . When copied to D4 , the relative reference D3 changes to D4 and returns the rank of the number in D4 , and so on.
  • INDEX($B$3:$B$12, RANK(D3,$D$3:$D$12), 1) → The number returned by RANK is fed to the row_num argument of the INDEX function, so it picks the value from that row. In the column_num argument, we supply 1 because we want to extract a value from the first column.

random assignment generator excel

We can see a random name Ruth in cell E3 .

random assignment generator excel

We can see 5 random names in the Random Name column without duplicates.

How to Select Random Sample in Excel

Read More: Random Selection from List with No Duplicates in Excel

Download the Workbook

Random selection in excel: knowledge hub.

  • Select a Random Sample from a Population
  • How to Randomly Select Participants in Excel
  • How to Randomly Select Rows in Excel
  • How to Randomly Select from a List in Excel
  • How to Randomly Select a Winner in Excel
  • How to Select Names Randomly in Excel
  • Excel VBA: Random Selection from List

<< Go Back to   Randomize in Excel   |  Learn Excel

What is ExcelDemy?

Tags: Randomize in Excel

Afia Kona

Afia Aziz Kona, a graduate of Civil Engineering from Khulna University of Engineering & Technology, Bangladesh, serves as a technical content creator in the ExcelDemy project. Possessing a passion for innovation and critical thinking, she actively embraces challenges. Beyond her engineering background, Afia exhibits a keen interest in Excel, having authored numerous articles on Excel & VBA-related issues to simplify the experience for users facing obstacles in Excel. Apart from creating Excel tutorials, she is also... Read Full Bio

Leave a reply Cancel reply

ExcelDemy is a place where you can learn Excel, and get solutions to your Excel & Excel VBA-related problems, Data Analysis with Excel, etc. We provide tips, how to guide, provide online training, and also provide Excel solutions to your business problems.

Contact  |  Privacy Policy  |  TOS

  • User Reviews
  • List of Services
  • Service Pricing

trustpilot review

  • Create Basic Excel Pivot Tables
  • Excel Formulas and Functions
  • Excel Charts and SmartArt Graphics
  • Advanced Excel Training
  • Data Analysis Excel for Beginners

DMCA.com Protection Status

Advanced Excel Exercises with Solutions PDF

ExcelDemy

MrExcel Message Board

  • Search forums
  • Board Rules

Follow along with the video below to see how to install our site as a web app on your home screen.

Note: This feature may not be available in some browsers.

  • If you would like to post, please check out the MrExcel Message Board FAQ and register here . If you forgot your password, you can reset your password .
  • Question Forums
  • Excel Questions

Multiple choice question generator using randomly selected Excel ranges

  • Thread starter MarkSELA
  • Start date Sunday at 11:37 AM
  • Tags named range random selection ranges of cells

MarkSELA

  • Sunday at 11:37 AM
  • I downloaded and installed xl2bb but my Windows 11 system is refusing to unblock it. I've tried unblocking it through system settings but no success. I've tried placing the add-in in a trusted folder and still not working.
  • I am designing a worksheet which will generate a random selection of math concept multiple choice questions. I am using Excel Formula: =INDEX(SORTBY(D2:D7,RANDARRAY(ROWS(D2:D7))),SEQUENCE(4),{1}) to jumble correct answers and wrong answers for each question. Wrong answers shaded in green and correct answers shaded in yellow.
  • Each question (bordered in red for the purpose of this request) is a named range: Question_1, Question_2, etc.
  • I want to paste a random selection of these ranges elsewhere in this same sheet. The blue shaded section is my feeble attempt to do that. I'm getting text strings and not ranges. Each question requires 8 rows on its own.
  • The final product after copying and pasting to document (Word then PDF) will look like this.
  • I know some VBA, which I've tried. As I've progressed through this project I've moved away from VBA relying more on Excel's built=in functions to do the work.
MC Question Generator.xlsm
Cell Formulas
RangeFormula
E2:E5,E12:E15E2=INDEX(SORTBY(D2:D7,RANDARRAY(ROWS(D2:D7))),SEQUENCE(4),{1})
I2,A19:B19,C12:C13,B13,A12:A13,A9:B9,C2:C3,B3,A2:A3I2=""
J2:J6J2=INDEX(SORTBY(H2:H10,RANDARRAY(ROWS(H2:H10))),SEQUENCE(5),{1})
B4:B8,B14:B18B4=INDEX(SORTBY(E2:E6,RANDARRAY(ROWS(E2:E6))),SEQUENCE(5),{1})
E6,E16E6=INDEX(SORTBY(D8:D10,RANDARRAY(ROWS(D8:D10))),SEQUENCE(1),{1})
C4,C14C4=IF(B4=D$8,"A",IF(B4=D$9, "A",IF(B4=D$10, "A","")))
C5,C15C5=IF(B5=D$8,"B",IF(B5=D$9, "B",IF(B5=D$10, "B","")))
C6,C16C6=IF(B6=D$8,"C",IF(B6=D$9, "C",IF(B6=D$10, "C","")))
C7,C17C7=IF(B7=D$8,"D",IF(B7=D$9, "D",IF(B7=D$10, "D","")))
C8,C18C8=IF(B8=D$8,"E",IF(B8=D$9, "E",IF(B8=D$10, "E","")))
C19C19=IF(B19=D$18,"Answer",IF(B19=D$19, Answer,IF(B19=D$20, "Answer","")))
Dynamic array formulas.

Attachments

Screenshot 2024-07-21 095834.jpg

Excel Facts

  • Yesterday at 9:14 AM

I wrote a short Python script which does what I need. Python: #Opens the Excel workbook containing the MC questions. import xlwings as xw mypath= "C:\\Users\\barry\\Desktop\\WS Generators\\MC Question Generator2.xlsm" app= xw.App() wb=app.books.open(mypath) sheet = wb.sheets["Sheet1"] import random randomnumber = random.randint(1,20) randlist = [] randlist.append(randomnumber) while len(randlist)<20: randomnumber = random.randint(1,20) if randomnumber in randlist: continue else: randlist.append(randomnumber) print(randlist) for j in range(20): question = "Question_"+str(randlist[j]) print(question) sheet.range(question).copy() sheet.range((2+8*j,11),(9+8*j,13)).paste(paste="values")  

felixstraube

Well-known member.

  • Yesterday at 10:17 AM

It is not very clear what you have and what you want to accomplish and how we could help. Could you explain in more detail just focusing on input data and expected result?  

Similar threads

  • Jul 3, 2024
  • Feb 28, 2024

Eric W

  • Jun 6, 2024

gtd526

  • Jan 28, 2024

Tetra201

  • Apr 29, 2024

Forum statistics

Share this page.

random assignment generator excel

We've detected that you are using an adblocker.

Which adblocker are you using.

AdBlock

Disable AdBlock

random assignment generator excel

Disable AdBlock Plus

random assignment generator excel

Disable uBlock Origin

random assignment generator excel

Disable uBlock

random assignment generator excel

IMAGES

  1. RANDBETWEEN to Create Random Number Generator in Excel

    random assignment generator excel

  2. Excel Random Number Generator

    random assignment generator excel

  3. Randomly Assign Names to Groups

    random assignment generator excel

  4. Using Excel for Random Assignment

    random assignment generator excel

  5. How to Select a Random Sample in Excel (Step-by-Step)

    random assignment generator excel

  6. Generate Random Numbers With Excel's RAND Function

    random assignment generator excel

VIDEO

  1. Random Rows Selector Tool

  2. random sampling & assignment

  3. Want RANDom data? It's easy... #excel

  4. Random number 100 to 150 💯😱 #excel #shorts #ytshorts #exceltips

  5. Two ways of developing Quizes (Multiple Choice)

  6. How to Create a Random Data Set in Excel

COMMENTS

  1. How to Make Random Groups in Excel & Google Sheets

    This tutorial will demonstrate how to make random groups in Excel and Google Sheets. Random Groups. To randomly assign items (data, people, etc.) to groups we can use the RANDBETWEEN and CHOOSE Functions: RANDBETWEEN Function. The RANDBETWEEN Function generates random numbers between two integers. In this example it will generate numbers 1, 2 ...

  2. Randomly assign data to groups

    In the current version of Excel, it is also possible to generate all random groups in one step with the RANDARRAY function. Both approaches are explained below. ... To force a recalculation, you can press the F9 key. Once you have a set of random assignments, you may want to stop the formula from returning new results. The classic way to do ...

  3. How to Randomly Select from a List in Excel (5 Methods)

    Method 5 - Using XLOOKUP to Randomly Select Multiple Values Without Duplicates in Excel. Steps: Use Method 3 and 4 to fill in two helper columns C and D. Use the formula given below in Cell G5: =XLOOKUP(F5:F7,D5:D12,B5:B12) Press the Enter button to get the array. Here are our random names as an array output.

  4. Randomly assign people to groups

    To randomly assign people to groups or teams of equal size, you can use a formula based on the RANK and ROUNDUP functions. In the example shown, the formula in D5 is: = INDEX ( groups, ROUNDUP ( RANK (C5, randoms) / ( ROWS ( randoms) / COUNTA ( groups)),0)) where groups (F5:F7) and randoms (C5:C22) are named ranges.

  5. Excel Tutorial: How To Randomly Assign Participants To Groups In Excel

    B. Discussing alternative methods for random assignment in Excel. 1. Using the RANDBETWEEN function: An alternative to the RAND function is the RANDBETWEEN function, which allows you to generate random integers within a specified range. This can help address the issue of non-reproducibility, as you can fix the range of random numbers to ensure ...

  6. Random Group Generator Template [Free Download]

    There are a couple of cool Excel features and a few helper columns that make this random group generator template in Excel. Here is how it is made: A2:A17 contains the list of names that are to be grouped randomly. A1:C17 has been converted into an Excel Table. This helps to keep the formulas intact when you add/remove names from the list.

  7. Excel RANDARRAY function

    To do random assignment in Excel, use RANDBETWEEN together with the CHOOSE function in this way: CHOOSE (RANDARRAY (ROWS ( data ), 1, 1, n, TRUE), value1, value2 ,…) Where: Data is a range of your source data to which you want to assign random values. N is the total number of values to assign.

  8. How to Set Up a Random Team Generator in Excel

    Set up a Random Team Generator. First, we need to get a random number in column C for each name. The formula for RAND in C3 looks like: =RAND() To apply the formula, we need to follow these steps: Select cell C3 and click on it. Insert the formula: =RAND()

  9. How to Create Random Groups in Excel (With Example)

    Step 3: Generate Random Groups. Next, we will assign each player to a random group. To do so, we will type the following formula into cell C2: We can then click and drag this formula down to each remaining cell in column C: Column C now assigns each player to one of three random teams. For example: Andy has been assigned to Team 2.

  10. How to Generate Random Groups in Excel (Formula)

    Generating Random Groups in Excel. To write this formula, you can use the below steps: First, in a cell, enter the CHOOSE function. And in the first argument of the CHOOSE, which is index_num enter the RANDBETWEEN function. Now, in the RANDBETWEEN, enter "1" as the bottom and "4" as the top.

  11. Excel random selection: how to get random sample from dataset

    On the add-in's pane, choose what to select: random rows, random columns or random cells. Specify the number or percentage for the desired sample size. Click the Select button. Done! For example, this is how we can select 5 random rows from our sample data set: And you will get a random selection in a second:

  12. Quickly generate random groups for list of data in Excel

    If you want to generate random groups for a list of data, and each group has a specified data size, you can use the ROUNDUP and RANK functions. 1. Firstly, you need a helper column to list some random data next to your data. Supposing in cell E2, type this formula =RAND() Then drag fill handle down to fill this formula to cells you use. 2.

  13. How to Randomize a List in Microsoft Excel

    Use RAND to Randomize List Items in Excel. To start the randomization process, first, open your spreadsheet with Microsoft Excel. In your spreadsheet, select the row next to the first item on your list. In the selected row, enter the following function and press Enter: =RAND() In the cell where you typed the function, you will see a random number.

  14. How to Randomize a List in Excel Into Groups: 5 Suitable Ways

    Method 1 - Randomize a List in Excel Into Groups Using RAND Function. Steps: Select the C5 cell and copy the following formula into it. =RAND() Enter, you will find the following number. Fill Handle the formula to copy down from C5 to C10. Go to the Formula tab in your toolbar. Select the Calculation option. Select the manual option.

  15. RAND and RANDBETWEEN functions to generate random numbers in Excel

    Excel RAND function - generate random real numbers. The RAND function in Excel is one of the two functions specially designed for generating random numbers. It returns a random decimal number (real number) between 0 and 1. RAND() is a volatile function, meaning that a new random number is generated every time the worksheet is calculated.

  16. 6 Ways to Select a Random Sample in Microsoft Excel

    Here is what you need to do. = RAND ( ) Add a column to the data with the above formula. Copy and paste the formula down the entire column. The RAND function will generate a random decimal number between 0 and 1 in the column. Now you can sort the data based on this random column.

  17. RANDOM Number Generator Excel

    RAND function will randomize numbers in C3:C7. RANK compares the random number in cell C3 among C3:C7 and ranks the number in descending order. 0.0843531593276469 for instance, ranks as number 3 among C3:C7. INDEX grabs the particular row number 3 from B3:B7 and that's Sebastian Thompson. Press the F9 key and the RAND function will recalculate.

  18. 5 Ways to Generate Random Numbers in Excel

    But you can use a simple formula involving the RAND function to generate random numbers between any two numbers. = RAND ( ) * ( Y - X ) + X. In general, you can create a random number between X and Y by using the above formula. = RAND ( ) * 9 + 1. For example, to generate numbers between 1 and 10 you can use the above formula.

  19. How to Generate Random Data in Excel

    Use the RANDBETWEEN function to generate random numbers within an upper and lower number. Step 1: Select the Cells to enter the random data. Here, B4: B12. Enter the formula. =RANDBETWEEN(1,100) The RANDBETWEEN function returns a random integer number between the specific numbers. Press CTRL+Enter.

  20. How to Create a Random Sample in Excel: Tools & Tips

    Download Article. 1. Open the Microsoft Excel program. You can also open an existing Microsoft Excel document if you have one that correlates to your random sample needs. 2. Select Blank workbook. If you aren't opening a new document, skip this step. 3. Enter your data.

  21. How to Select a Random Sample in Excel (Step-by-Step)

    Step 3: Copy & Paste the Random Values. Next, highlight the values in column B and click Ctrl + C. This will copy all of the values. Next, right click on cell C2 and choose Paste Values. Note that the values in column B may change once you do this, but don't worry about this. Lastly, highlight the values in column C and drag them to replace ...

  22. How to get random sample in Excel with no duplicates

    On the Ablebits Tools tab, click Randomize > Select Randomly. Select the range from which you want to pick a sample. On the add-in's pane, do the following: Choose whether you want to select random rows, columns, or cells. Define the sample size: that can be a percentage or number.

  23. How to Select a Random Sample in Excel (4 Methods)

    Steps: Enter the following formula in cell D3: =RAND() Here, the RAND function returns in cell D3 with a random number. Press ENTER. We can see a random number in cell D3. Drag down the formula with the Fill Handle tool. We can see random numbers in the Random Number column. Now, we want only values in the Random Number column.

  24. Multiple choice question generator using randomly selected Excel ranges

    A random selection of 5 questions from the 9 which exist. 3 : may be odd. may be odd or even. Question_2: Question_9: 4: a. may be odd. can always be divided by 3. is always odd. Question_3: Question_7: 5: b. can always be divided by another odd integer. can always be divided by another odd integer. can always be divided by another odd integer ...