How to Select a Random Sample in Excel

To select a random sample in Excel, you can use the built-in RAND() or RANDBETWEEN() functions along with sorting and filtering features. Here's a step-by-step guide on how to do it:

  1. Open your Excel spreadsheet containing the data you want to sample from.
  2. In an empty column, type "Random" in the first cell as a header for the new column.
  3. In the cell below the header, type the formula =RAND() and press Enter. This will generate a random number between 0 and 1.
  4. Copy the formula in the cell by clicking on the cell, and press Ctrl+C (Cmd+C on Mac) to copy.
  5. Select the range of cells below the one with the formula, down to the last row of your data. Press Ctrl+V (Cmd+V on Mac) to paste the formula, generating random numbers for each row.
  6. Now, you will sort your data based on the random numbers. Click on any cell in the "Random" column.
  7. Go to the Data tab in Excel, and click on the "Sort" button (or "Sort Smallest to Largest" button) to sort the data based on the random numbers.
  8. After sorting the data, you can select the desired sample size by choosing the required number of rows from the top of the sorted data.

For example, if you want a random sample of 50 rows, simply select the first 50 rows after the header row.

Example

Imagine you have a dataset with a list of 200 students, and you want to select a random sample of 20 students. Here's what you do:

  1. Open the Excel file containing the student list.
  2. In column B, type "Random" in cell B1 as the header.
  3. In cell B2, type the formula =RAND() and press Enter.
  4. Copy the formula in cell B2 and paste it into cells B3 through B201.
  5. Click on any cell in column B (the "Random" column).
  6. Go to the Data tab and click the "Sort Smallest to Largest" button to sort the data based on the random numbers.
  7. After sorting, select the first 20 rows of data (excluding the header row) to get your random sample of 20 students.
Did you find this useful?