Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

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.

Select cells randomly from a column with formula

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

Select cells randomly from a range with Kutools for Excel good idea3


Quickly Sort or select cells/Rows/Columns randomly from a selection in Excel

Kutools for Excel's Sort Range Randomly can quickly sort or select data randomly by cells or columns or rows. Click for full-featured 30 days free trial!
doc sort randomly
doc select randomly
Kutools for Excel: with more than 300 handy Excel add-ins, free to try with no limitation in 30 days.
 

arrow blue right bubble Select cells randomly from a column with formula

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:

doc-select-cells-randomly1

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:
doc-select-cells-randomly2

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)).
doc-select-cells-randomly3

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:
doc-select-cells-randomly4


arrow blue right bubble 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.

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:
doc-select-cells-randomly5

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.doc-select-cells-randomly6

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.


arrow blue right bubble Select cells randomly from a range with Kutools for Excel

Kutools for Excel, with more than 300 handy functions, makes your jobs more easier. 

After free installing 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:
doc select randomly 1

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. Then click OK or Apply. See screenshot:

Select random 10 cells from the selected range
doc select randomly 2

Select random 5 rows from the selected range
doc select randomly 3

Select random 4 columns from selected range
doc select randomly 4

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.
doc select randomly 5

arrow blue right bubble randomly select or sort data in a range


Easily Insert Random Data without duplicates in a range of cells

If you want to insert random and no duplicate integer numbers, dates, times or strings, even custom lists into a range of cells, the forumula maybe hard to remember. But Kutools for Excel's Inser Random Data can quickly handle these jobs as easily as possible. Click for full features 30 days free trial!
doc insert random data
Kutools for Excel: with more than 300 handy Excel add-ins, free to try with no limitation in 30 days.
 

Related Article:

Randomly sort cells in a column or range


Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial.
kte tab 201905

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
officetab bottom
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Vinay · 2 years ago
    Very useful, but the format of the cells has been changed and also its showing few duplicate values. Please tell me how to get it solved.
  • To post as a guest, your comment is unpublished.
    Martyn Smith · 2 years ago
    Hi I am looking to build a grid with names on the left and dates (weeks) across the top. I then need to have a function that fills in random X's on particular weeks for all names. Is this possible
  • To post as a guest, your comment is unpublished.
    #Braatsy · 3 years ago
    This one is just awesome! Exactly what I needed! Thanks!
  • To post as a guest, your comment is unpublished.
    art · 4 years ago
    How to select perecent of cells randomly and replace by a specific number?
  • To post as a guest, your comment is unpublished.
    K. Chris C. · 4 years ago
    Thanks. Was a great and quick help.
  • To post as a guest, your comment is unpublished.
    K. Chris C. · 4 years ago
    Thanks. Really was a great and quick help.
  • To post as a guest, your comment is unpublished.
    lk · 4 years ago
    Wow!!! This is really amazing!
    Thanks a lot for these great tricks.
  • To post as a guest, your comment is unpublished.
    ileana · 5 years ago
    Great info, however on my "randomly selected cells" there are duplicates... how can I prevent that from happening? I need the random selection to return unique cells
    • To post as a guest, your comment is unpublished.
      msword · 4 years ago
      to do this you will need to set up a random non repeating set of numbers
      I used this website to do it:

      http://support.microsoft.com/kb/213290
  • To post as a guest, your comment is unpublished.
    Bel Vanderploeg · 5 years ago
    I would like to random select a document with 500 items. I want to select 10 percent. There are four columns in that document. Is there a way to do this?
  • To post as a guest, your comment is unpublished.
    Bel Vanderploeg · 5 years ago
    i would like to sort 4 columns but only one column is sorted. Is there a way to do this?
  • To post as a guest, your comment is unpublished.
    Zabron C. Nziku · 5 years ago
    Thanks, it was very helpful
  • To post as a guest, your comment is unpublished.
    Kiran · 5 years ago
    It was very helpful.
    I was looking for random selection of numbers and random selection of names for performing Quality check. please help me.
  • To post as a guest, your comment is unpublished.
    Michael C. Johnson · 5 years ago
    Thanks, very helpful!