﻿

## How to select cells randomly in Excel?

Supposing you have a column of values (A1: A15) in a worksheet, and now you need to select 5 random cells of them, how could you deal with this? In this article, I will show you some tricks to select cells randomly in Excel.

### Hint

As the following screenshot shows, you have a range of data from A1 to A15, the Rand and Index formula can help you display the random cells in a new column. Please do as follows:

 with more than 120 handy Excel functions, enhance your working efficiency and save your working time.

1. In the adjacent cell such as B1, enter the formula =RAND(), and press the Enter key, then copy the formula to the cell B15. And the random values will be filled with the cells. See screenshot:

2. Then in the next cell over, in this case cell C1, enter the formula =INDEX(\$A\$1:\$A\$15,RANK(B1,\$B\$1:\$B\$15)).

3. Then press Enter key, and select the cell C1, drag the fill handle to cover as many cells as desired selections. And random 5 cells of range A1:A15 have been displayed in the column C. See screenshot:

#### Select cells randomly from a column with User Defined Function (UDF)

The following VBA code also can help you to display random cells that you need.

 with more than 120 handy Excel functions, enhance your working efficiency and save your working time.

1. Click Developer > Visual Basic, a new Microsoft Visual Basic for applications window will be displayed, click Insert > Module, and input the following function into the Module:

```Function RandomSelection(aRng As Range)
'Update20131113
Dim index As Integer
Randomize
index = Int(aRng.Count * Rnd + 1)
RandomSelection = aRng.Cells(index).Value
End Function
```

2. Then close the module window, and enter this function =RandomSelection(\$A\$1:\$A\$15) in the cell B1. See screenshot:

3. Press Enter key, and a random value of A1:A15 has been displayed in column B. And then drag the fill handle to cover as many cells as desired selections.

The above two methods can display the random cell values in a new column, and they are only applied for a single column range, not work for a range of cells. Kutools for Excel's Sort Range Randomly tool can help you select cells randomly in an original range conveniently.

#### Select cells randomly from a range with Kutools for Excel

 with more than 120 handy Excel functions, enhance your working efficiency and save your working time.

After Kutools for Excel, please do as below:

1. Select the range that you want to use.

2. Apply the utility by clicking Kutools > Range > Sort Range Randomly, see screenshot:

3. In the Sort Range Randomly dialog box, click Select button, and enter the number of the cells that you want to select, then check the Select Type you need. See screenshot:

4. Then click OK or Apply, and random 10 cells have been selected in the original range. See screenshot:

If you want to select random rows or columns, Sort Range Randomly utility also can help you.

Select random 2 rows from the selected range

Select random 2 columns from selected range

Advanced to select random cells, Sort Range Randomly of Kutools for Excel can sort data randomly in whole range, in each rows, in each columns and so on.

You maybe also interested in this utility:

#### Insert Random Data

Kutools for Excel's Insert Random Data can insert random integer, date, time,
string or custom listin a range.
Get 60-Days Free Trial Now!
Click Kutools > Insert >Insert Random Data. See screenshot:

### Recommended Productivity Tools

The following tools will greatly save your time and effort, which one do you prefer?
Office Tab: Using handy tabs in your Office, as the way of Chrome, Firefox and New Internet Explorer.
Kutools for Excel: 120 powerful new functions for Excel, Increase your productivity in 5 minutes. Save two hours every day!
Classic Menu for Office: Bring back familiar menus to Office 2007, 2010, 2013 and 365, as if it were Office 2000 and 2003.

### Kutools for Excel

Amazing! Increase your productivity in 5 minutes. Don't need any special skills, save two hours every day!

More than 120 powerful advanced functions which designed for Excel:

• Merge Cell/Rows/Columns without Losing Data.
• Combine and Consolidate Multiple Sheets and Workbooks.
• Compare Ranges, Copy Multiple Ranges, Convert Text to Date, Unit and Currency Conversion.
• Count by Colors, Paging Subtotals, Advanced Sort and Super Filter,