There are several ways to Select Random Sample in Excel. Among them, we will show you 4 simple, easy, and effective methods to select random samples in Excel.

**Table of Contents**hide

## 4 Methods to Select Random Sample in Excel

The following table shows **Name** and **Salary** columns. We will use 4 methods to select random name and salary from this table. Here, we used Excel 365. You can use any available Excel version.

### Method-1: Using Data Analysis Toolbar to Select Random Sample

In this method, we can select random values from numeric values only using the **Data Analysis** toolbar. Here, we will select 5 random salaries in the** Random 5 Salary** column.

âž¤To begin with, we will go to the **Data** tab in the ribbon, and we will select** Data Analysis** tool.

A **Data Analysis** window will appear.

âž¤ We will select **Sampling** as **Analysis Tools**.

âž¤ Click on **OK**.

Now, a **Sampling **window will appear.

âž¤ We will select the **Input Range** from **C3** to **C12**, in the **Number of Sample** box, we will type** 5**

âž¤ InÂ the **Output Range** we will select cells from **E3 **to **E7**, and we will click **OK**.

Finally, we can see 5 random salaries in the **Random 5 Salary** column.

**Read More:** Random Selection Based on Criteria in ExcelÂ

### Method-2: Using RAND Function

In this case, we will use the **RAND** function to select the top 5 random rows.

âž¤ First of all, we will type the following formula in cell** D3**.

`=RAND()`

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

âž¤ After that, we will press **ENTER**.

We can see a random number in cell **D3**.

âž¤ We will now drag down the formula with the **Fill Handle** tool.

Now, we can see random numbers in the **Random Number** column.

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

âž¤ To do so, we will select from cell **D3** to **D12**, and we right click on the mouse.

âž¤ After that, we click on **Copy**.

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

âž¤ We will select from cell **D3** to** D12**, and we will right-click on the mouse.

âž¤ After that, we will click on **Paste Special** and then click on **Paste Values**.

Now, we can see in the **Random Number** column that there is no formula in the formula bar.

Therefore, there are only values in the **Random Number** column.

âž¤ Now, we will select our entire dataset, and we will go to the **Home **tab.

âž¤ After that, we will select **Editing**>**Sort & Filte**r>**Custom Sort**.

Now, a **Sort** window will appear.

âž¤ We will select **Sort by** as **Random Number**, and **Order** as **Largest to Smallest**.

âž¤ Then click **OK**.

Finally, we can see the sorted **Name** and **Salary** according to the largest to smallest **Random Number**.

âž¤ Now, we will select the top 5 **Name** and **Salary**, and we will right click on the mouse, and we will select **Copy.**

âž¤ Now, we paste the top 5 **Name** and **Salary** in columns **F** and **G**.

**Read More:** How to Randomly Select Rows in ExcelÂ

### Method-3: Using INDEX, RANDBETWEEN and ROWS Functions

In this method, we want to select a single random name.

We will use theÂ **INDEX**, **RANDBETWEEN**, and** ROWS** functions.

âž¤ First of all, we will type the following function in cell **E3**.

`=INDEX($B$3:$B$17,RANDBETWEEN(1,ROWS($B$3:$B$17)))`

Here,

**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.

âž¤ Now, press **ENTER**.

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

**Read More:** How to Generate a Random String from a List in ExcelÂ

### Method-4: Select Random Sample without Duplicates

In this method, we can select random samples without duplicates. In the following table, we want **Random Number** and **Random Name**. Here, we will use the **RAND**, **INDEX**, and** RANK **functions.

âž¤ First of all, we will type the following formula in cell **D3**.

`=RAND()`

âž¤ Press **ENTER**.

We can see a random number in cell **D3**.

âž¤ We can copy the formula with the** Fill Handle **tool.

Now, we can see random numbers in the** Random Number **column.

âž¤ Now, we will type the following formula in cell **E3**.

`=INDEX($B$3:$B$12, RANK(D3,$D$3:$D$12), 1)`

Here,

**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.

âž¤ Press **ENTER**.

Now, we can see a random name *Ruth* in cell **E3**.

âž¤ We can drag down the formula with the **Fill Handle** tool.

Finally, we can see 5 random names in the **Random Name **column without duplicates.

**Read More:** How to Make a Random Selection from List Without Repetition in Excel

## Download Workbook

## Conclusion

Here, we tried to show you some easy and effective methods that will help you to select random sample in Excel. We hope you will find this article helpful. If you have any queries or suggestions, please feel free to know us in the comment section.