0% found this document useful (0 votes)
71 views3 pages

Random Sample in Excel

This document provides instructions for creating a random sample in Microsoft Excel. It describes how to assemble the original data in Excel, generate random numbers to select a subset of data, and sort the data based on the random numbers. The process involves adding a column with the RAND() function to generate random decimals, copying this formula down to select rows at random, and then sorting the data based on this new column of random numbers. This allows the user to easily select a randomized subset of rows for their sample.

Uploaded by

Bahauddin Baloch
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views3 pages

Random Sample in Excel

This document provides instructions for creating a random sample in Microsoft Excel. It describes how to assemble the original data in Excel, generate random numbers to select a subset of data, and sort the data based on the random numbers. The process involves adding a column with the RAND() function to generate random decimals, copying this formula down to select rows at random, and then sorting the data based on this new column of random numbers. This allows the user to easily select a randomized subset of rows for their sample.

Uploaded by

Bahauddin Baloch
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

3/11/2019 The Best Way to Create a Random Sample in Excel - wikiHow

How to Create a Random Sample in Excel


Co-authored by wikiHow Staff

This wikiHow teaches you how to generate a random selection from pre-existing data
Explore this Article
in Microsoft Excel. Random selections are useful for creating fair, non-biased samples
of your data collection. Assembling Your Data in Excel
Creating a Random Sample
Sorting Your Sample
Related Articles
References

Part
Assembling Your Data in Excel
1

1 Open the Microsoft Excel program. You can also open an existing Microsoft Excel document if you have
one that correlates to your random sample needs.

2 Select Blank workbook . If you aren't opening a new document, skip this step.

3 Enter your data. To do this, click on a cell into which you wish to input data, then type in your data.

Depending on the type of data you have, this process will vary. However, you should start all data in the
"A" column.
For example: you might place your users' names in the "A" column and their responses to a survey
(e.g., "yes" or "no") in the "B" column.

4 Make sure you have all relevant data entered into your spreadsheet. Once you're positive that you've
added all necessary data, you're ready to generate your random sample.

Part
Creating a Random Sample
2

1 Right-click the far left column's name. For example, if all of your data begins in column "A", you'd right-
click the "A" at the top of the page.

2 Click Insert . This will add a column to the left of your current left column.

After doing this, any data that was in the "A" column will be relisted as being in the "B" column and so
on.

3 Select the new "A1" cell.

4 Type "= RAND()" into this cell. Exclude the quotation marks. The "RAND" command applies a number
between 0 and 1 to your selected cell.[1]
If Excel attempts to automatically format your "RAND" command, delete the formatting and re-type the
command.

5 Press ↵ Enter . You should see a decimal (e.g., 0.5647) appear in your selected cell.

https://www.wikihow.com/Create-a-Random-Sample-in-Excel 1/3
3/11/2019 The Best Way to Create a Random Sample in Excel - wikiHow

6 Select the cell with the random sample number.

7 Hold down Control and tap C . Doing this will copy the "RAND" command.

For a Mac, you'll hold down ⌘ Command instead of Control .


You can also right-click the "RAND" cell and then select Copy .

8 Select the cell below your random sample number. This will likely be the "A2" cell.

Clicking the "A1" cell and highlighting from there can cause a sorting error.

9 Highlight the rest of the random sample cells. To do this, you'll hold down ⇧ Shift while clicking the cell
at the bottom of your data range.
For example, if your data in columns "B" and "C" extends all the way down to cell 100, you would hold
down ⇧ Shift and click "A100" to select all "A" cells from A2 to A100.

10 Hold down Control and tap V . Doing so will paste the random sample command into all selected
cells (e.g., A2 through A100). Once this is done, you'll need to sort your data using the random numbers
to reorder your results.
Again, Mac users will need to hold down ⌘ Command instead of Control .

Part
Sorting Your Sample
3

1 Select the top left cell. In most cases, this will be the "A1" cell. Before you can sort your sample, you'll
need to highlight all of your data.
This includes the random sample numbers to the left of your data as well.

2 Hold down ⇧ Shift and select the bottom right cell. Doing so will highlight all of your data, making it
ready for sorting.
For example, if your data takes up two columns of 50 cells each, you would select "C50" while holding
down ⇧ Shift .
You can also click and drag your cursor from the top left corner to the bottom right corner of your data
(or vice versa) to highlight it.

3 Right-click your data. This will bring up a context menu with options that will allow you to sort your data.

If you're using a Mac, you can click using two fingers (or hold down Ctrl and click) to bring up the
context menu.

4 Hover your cursor over Sort .

5 Click Sort Smallest to Largest . You can also click Sort Largest to Smallest here--the only thing that
matters is that your data is reorganized randomly according to the "= RAND()" values in the "A" column.

6 Review the sorting results. Depending on how many results you need, your process from here will vary.
However, you can do a couple of things with the sorted data:
Select the first, last, or middle half of the data. If your number of data points is too large to warrant
this, you can also settle on a lower fraction (for example, the first eighth of the data).
Select all odd- or even-numbered data. For example, in a set of 10 data points, you would either pick
numbers 1, 3, 5, 7, and 9, or 2, 4, 6, 8, and 10.
Select a number of random data points. This method works best for large sets of data where picking
half of the information is too ambitious.

https://www.wikihow.com/Create-a-Random-Sample-in-Excel 2/3
3/11/2019 The Best Way to Create a Random Sample in Excel - wikiHow

7 Choose your random sample participants. Now you have a non-biased sample pool for a survey,
product giveaway, or something similar.

Community Q&A

Question

When I copy the random values from column A and paste them in column B following the paste special ->
values instruction, I get a different set of numbers from what I have in column A. Is this correct?

wikiHow Contributor
Community Answer

The values in column B should match what was in column A before, but as you paste them, the values in column A
will change. That's expected since the RAND() formula recalculates a new random number each time you do
anything else in the spreadsheet. Copying the values only (not the formula) over to column B will prevent them from
changing in future.

Question

Can I make a random sampling with only a certain set of numbers?

wikiHow Contributor
Community Answer

Yes. For example, =RANDBETWEEN(1,13) will you give you a random number between 1 and 13.

Tips

If you don't have Microsoft Excel, there are other free programs online (such as Google Sheets or Outlook's Excel
app) that may allow you to create a random sample.
Microsoft makes an Excel app for iPhone and Android platforms so you can create spreadsheets on-the-go.

Warnings

Failing to use a random sample when looking for results (e.g., sending out a survey after updating a service) may
cause your answers to be biased--and, therefore, inaccurate.

References

1. https://www.surveymonkey.com/blog/2012/06/08/random-sample-in-excel/

https://www.wikihow.com/Create-a-Random-Sample-in-Excel 3/3

You might also like