How to Select a Random Sample in Google Sheets

To select a random sample in Google Sheets, you can use the RAND or RANDBETWEEN functions in combination with sorting and filtering. Here's a step-by-step guide on how to select a random sample:

  1. Open your Google Sheet with the data you want to sample from.
  2. In an empty column, insert the RAND() function in the first cell of the data row. This function generates a random number between 0 and 1. For example, if your data starts in row 2, insert =RAND() in the first cell of row 2 in an empty column.
  3. Copy the formula and paste it in the rest of the cells in the column corresponding to your data rows.
  4. Now you need to sort the data based on the random numbers generated. Click on the column header with the random numbers to select the entire column.
  5. Click on "Data" in the top menu, then click on "Sort sheet A-Z" or "Sort sheet Z-A" to sort the data based on the random numbers. This will shuffle your data randomly.
  6. After sorting the data, you can select the desired sample size by selecting a specific number of rows from the top of your data.

Example

Let's say you have a dataset of 100 rows (from A2 to A101) and you want to select a random sample of 10 rows.

  1. In cell B2, insert the =RAND() function.
  2. Copy the formula in B2 and paste it in cells B3 to B101.
  3. Click on the column header "B" to select the entire column.
  4. Click on "Data" in the top menu, then click on "Sort sheet A-Z" or "Sort sheet Z-A" to sort the data based on the random numbers.
  5. After sorting, select the first 10 rows of data (from A2 to A11) as your random sample.
Did you find this useful?