|
Home > Formulas > Math Trig > Random Names Excel Choose Random NamesThese examples show how to use the Excel RAND function to select a specific number random names from an Excel worksheet list. In the screen shot below, number 3 is entered in cell B3, and there are 3 random names listed in column E.
|
See how to choose a specific number of random names from a list in Excel, using the Excel RAND function, combined with other Excel functions.
There are two versions of the Excel Name Chooser:


See how you can choose a specific number of random names in Excel 365, from a list of names on a worksheet.
The random name formula uses functions that are available in Excel 365 - RANDARRAY, HSTACK, SORT and TAKE.
Because the random numbers are created in the formula, you don't need a RAND column in the table with people's names.
In the sample file, there is a named Excel table, tblNamesA with 2 columns: Name, and Rand

In both columns of the table, the data cells have been named:
These names are used in formulas on the Name Chooser sheets
Tip: You can see name details in the Name Manager, on Excel's Formulas tab
This name chooser can be used in Excel 365, or other versions that support Excel's new spill functions. For older versions of Excel, go to the Chooser ALL instructions.
There are 3 formula cells on the worksheet, shown in the screen shot below:

To see a list of random names, type a number in cell B3

After a number is entered in cell B3, the randomly-chosen names are listed in column E, with a number beside each name, in column D.
The SEQUENCE formula in cell D3 creates a list of consecutive numbers for the names, based on the number in cell B3.
If something causes an error, such as no number entered in B3, the IFERROR function shows two hyphens as the result.

This formula in cell E3 creates the random list of names.
Here's how the formula works:

Important: Every time the worksheet calculates, the list of randomly-chosen names will update automatically.
If you want to save the list of names that were selected, follow the steps in the Save the Names section, further down this page.
This name chooser can be used in any version of Excel - it does NOT use the new spill functions.
There are 2 formula ranges on the worksheet:

To see a list of random names, type a number in cell B3

After a number is entered in cell B3, the randomly-chosen names are listed in column E, with a number beside each name, in column D.
This formula is entered in cell D3, and copied down to cell D12. These formulas create a list of numbers for the names, based on the number in cell B3.
If any number in the preceding rows is equal to the number in cell B3, the remaining cells show an empty string ("").
If something causes an error, such as no number entered in B3, the IFERROR function shows two hyphens as the result.

This formula, entered in cell E3 and copied down to E12, creates the random list of names.
Here's how the formula works:

Important: Every time the worksheet calculates, the list of randomly-chosen names will update automatically. If you want to save the list of names that were selected, be sure to copy the current names, and paste them as values, somewhere else.
This very short video shows the steps, using a different sample file. There are written steps below the video.
Follow these steps to save the current list of randomly-chosen names:

Random Name Selection: Download the workbook with the Excel Random Name Chooser examples. The formulas on the Chooser365 sheets work in Excel 365, or other versions with the new spill functions. For other versions of Excel, use the ChooserALL sheet. The zipped file is in xlsx format, with no macros.
INDEX function and MATCH Function
Last updated: March 20, 2024 9:28 PM