×

Purpose of Randomize in Excel

Excel spreadsheets are used on a large scale for business and personal usage. It is used to store data, perform multiple calculations, make assumptions based on charts and graphs etc. Coming to the concept of randomized data, Excel generates random numbers. Random numbers act as an input to the formula to check multiple results and determine whether it works under various conditions.

It is used to sort the actual data, assign different values to the other person, and process multiple customer requests in random order. Excel provides a default random number generator called RAND, a built-in function used in a formula. It generates the random real number between zero and one.

What is Randomize List?

The term Randomize is also known as shuffle in general English. Its function is used to shuffle the data in the list using RAND function and SORT function. The purpose of RAND function is to shuffle the data randomly and sort is used to sort the data.

 The syntax for the formula is “=RAND()” which generates the random number. For example to generate a random number between two variables namely “x and y”, the formula used are “=RAND()(y-x)+x”. To generate a whole number use INT function called integer which takes the integer part of the decimal number.

Syntax for the formula be “=INT(RAND()(y-x)+x)”. If the values present in the sheet are recalculated, the new random data will be generated.

RANDBETWEEN() Function

The RANDBETWEEN function is used to execute the random numbers between two various boundary numbers. For example, “=RANDBETWEEN (1, 10)” will execute the random integer number 1 and 10. This function is used to generate the random numbers for simulations, games of chance and raffles.

A simple method is to insert random numbers for all columns, just insert the formula in the particular cell and drag the + sign to insert the formula downward. This will help to insert the random numbers in all columns.

Random Sort

Random sort function helps to sort the randomized data present in the rows or columns. After inserting the RAND () formula in the cell, the randomized data are present in all the cells. To sort the randomized data just, click the “Data” tab and choose the option called “Sort A to Z” to sort the data present in the cells. After sorting the user are allowed to hide the randomized data present in the cell.

What are the various methods to randomize data in Excel?

There are five different methods to randomize the data present in Excel.

  1.  RAND Formula
  2. RANDBETWEEN Formula
  3. RANDARRAY, SORTBY and ROWS Formula
  4. INDEX and RANDBETWEEN formulas
  5. CHOOSE and RANDBETWEEN formulas

1. How to use RAND() formula?

Step 1: Enter the set of data in the respective column namely A1:A5

Step 2: Select the cell B1  which is next to the cell A1 and insert the formula as =RAND ().

Purpose of Randomize in Excel

Step 3: If you wish to insert the randomized data to all the remaining columns, click the “+” sign and drag towards cell A5. The respective cell is inserted with randomised data.

Purpose of Randomize in Excel

How to apply SORT() function?

In the above chart randomized data are present in the data table. To sort this data, choose Sort and Filter data in Data tab.

Purpose of Randomize in Excel

Do you know you can sort the above data in ascending order as well. Go to Sort & Filter-> Click on Sort Ascending.

Purpose of Randomize in Excel

The sorted data are list are as follows,

Purpose of Randomize in Excel

Usually the random numbers change every time in the spreadsheet, hence if it is needed copy and paste it in the new location for future reference.

How to use RANDARRAY() function?

The RANDARRAY function generates a list of random decimal numbers between 0 and 1. The steps to be followed to insert a RANDARRAY function are as follows,

Step 1: Insert the data in the spreadsheet. Here the data are entered in cell range A1:A5

Step 2: Select cell B1 and enter the formula as =RANDARRAY (5, 1).HERE number ‘5’ denotes the number of columns, and the number ‘1’ represents the row. 

STEP 3: The result will be displayed in the cell range B1:B5 as follows,

Purpose of Randomize in Excel

Here the RANDARRAY function fills the value in multiple cells at a time. This process is called spilling.

RANDARRAY and SORTBY

Here the SORTBY function is used to sort the values, which sort the data in ascending order in a default manner.

Step 1: Select the cell range A1:A5 and B1:B5 simultaneously to apply the SORTBY function.

Step 2: Select the new cell to display the new data. Enter the formula as =SORTBY (A1:A5,B1:B5). This sorts the data as shown in the image as follows,

Purpose of Randomize in Excel

RANDARRAY, SORTBY and ROWS

Row function is used to count the number of rows in the number. To implement Row function steps to be followed are,

Step 1: Enter the data in the spreadsheet.

Step 2: After inserting the RANDARRAY and SORTBY function, add the ROWS function.

Step 3: Enter the formula as =SORTBY(A1:A8,RANDARRAY(ROWS(A1:A8),1)

Step 4: The data will be look like below as follows,

Purpose of Randomize in Excel

Here the functions are used in the formula as SORTBY, RANDARRAY and ROWS.

How to use RANDBETWEEN() function?

RANDBETWEEN function returns a random integer number between the numbers described. Every time a new random number is generated, the calculations are performed on a worksheet. The syntax for this function is,

RANDBETWEEN(bottom, top)

Bottom – It represents the integer value which is smaller in value

Top – It represents the integer value which is larger in value.

To implement this function steps to be followed are,

Step 1: Enter the data in the spreadsheet.

Step 2: Select a new cell range and enter the formula as =RANDBETWEEN(top,bottom)

Purpose of Randomize in Excel

From the above table the values present in B1:B8 are in the range between (1,100).

How to use INDEX() function?

The INDEX function is used to return the value of the cell or reference to a value from the set of data range or table. The index form is subdivided into two types namely,

Array form – It returns the value of the cell which is specified or array of cells.

Reference form- It returns the reference of the specified cell.

Array form

The syntax of the array form is,

INDEX(array, row_num[column_num])

From the above syntax, this function returns the value of the element from the selected cell which is an array or table format.

Parameters

Array – It represents the cell range or array constant.

If the user’s data contains only one row or one column, then the row or column number is optional. If the data contains more than one row or columns, only the row number and column number is used for representation

INDEX – It represents the complete row or column in an array.

Row number – This function is used to select the entire row which returns a value

Column number – This function is used to select the entire column which returns a value. If row number is not present in the function, column number should present. If column number is not present row number should present.

Let’s have a look, how to use the INDEX function in following methods.

Step 1: Enter the data in the spreadsheet

Step 2: Select a new cell called B1 and enter the formula as =INDEX(CELL RANGE,3,2). Here 3,2 is the intersection of third row and second column.

Purpose of Randomize in Excel

From the above worksheet, the scale option is selected where it is represented using the formula =INDEX(A2:B5,3,2) where 3,2 represents third row and second column.

Using array function for two cells

The INDEX function is used to find the value in two cells which is represented in the form of 2x2 array.

To implement this array,following steps should be followed.

Step 1: Choose a cell name as B1 and enter the formula  as =INDEX({3,7;2,5},0,2)

Purpose of Randomize in Excel

From the above formula, the number 3 and 7 present in the first row and second column where 2 and 5 present in second row and second column.

The resultant value of 7 represnets the first column and second column, where 5 represents the second row and second column.

Reference Form

The Reference form is used to return the reference of the cell which the intersection of respective row and column.

Syntax

The syntax for the reference form is shown below,

INDEX(reference, row_num,[column_num],[area_num])

To implement reference form, following methods are used,

Step 1: Enter the data in the respective row and column wise as shown below,

Purpose of Randomize in Excel

Step 2: Select a new cell and enter the formula like,

=INDEX(A2:C5,2,3)

A2:C5 is the cell range where 2,3 is the intersection of second row and third column.

Purpose of Randomize in Excel

Next enter the formula as, =INDEX((A1:C5,A6:C10),3,2,2)

Here two various ranges are selected in a single table as A1:C5 and A6:C10. The number 3,2,2 denotes the third row ,second column in the second area of A6:C10 which is the cell name of B8.

From the above chart, the result is displayed as 156 which is the value of the cell B8.

Purpose of Randomize in Excel

How to sum the rows or columns in Excel?      

To sum the rows or columns or excel, following steps are followed.

Step 1: Enter the data in the worksheet and select a new cell and enter the formula as =SUM (INDEX (A2:C10,1,2,1)

Here A2:C10 is called cell range. 0,2,1 denotes the second column in the first area.

Here from the above spreadsheet, the result is 2161 which is the sum of the column of B2:B10.

Purpose of Randomize in Excel

How to implement Choose Function in Excel?

Choose function is used to return a value from a list based on the position.

The syntax for choose function is

=CHOOSE (index_num, value 1,[value 2],…)

Parameters

  • Index_num – The number between 1 and 254 is chosen for the value.
  • Value 1 – The first value to be chosen.
  • Value 2- The second value to be chosen.

To implement choose function, following steps are followed.

Step 1: Enter the data in the spreadsheet as follows.

Step 2: Select a new cell and enter the formula =CHOOSE (2, A1,A2,A3,A4,A5). Here A1,A2,A3,A4,A5 is the cell range where ‘2’ is the index number.

Purpose of Randomize in Excel

From the above spreadsheet, the value present in the cell A3 is displayed as result where the index number is ‘2’ from the cell range A1:A5.

Summary

From the above tutorial, the various functions and formulas for Randomization is briefly explained.


Related Topics

Division in Excel

Excel worksheet are widely used for calculation purposes. Mathematics calculations include addition, subtraction, multiplication, division etc. Performing this calculation manually takes time and sometimes leads to error. To get the...

5 minutes read.

Excel WEEKNUM() Function

The WEEKNUM() function in excel returns the week number from 1 to 54 of a specific date in a year. The WEEKNUM function starts counting with the week that contains January 1...

1 minute read.

Solver in Excel

What is Solver? Microsoft Excel facilitates an add-in programming tool known as Solver that uses operational research techniques to find the optimal solutions for objective problems. This tool operates with a group of...

5 minutes read.

Excel MIN() Function

Excel MIN() Function The MIN() function in excel returns the smallest or minimum value from the provided numbers, named range or array. It ignores logical values and text. Syntax MIN(Number1,Number2, ...) Parameter Number1(required)- This parameter represents the...

1 minute read.

Frequency Distribution in Excel

The term Frequency Distribution in Microsoft Excel is mainly used to explain how the data will be spread out. And it could be achieved with the help of the Histogram,...

7 minutes read.

Excel Ribbon Toolbar

Excel Ribbon/Toolbar How does a toolbar look like? The top section of an excel file is called a Ribbon or a toolbar. It has various commands which can be useful for us in our daily work....

6 minutes read.

How to apply Advanced Filter in Excel

It was known that the advanced filter in Microsoft Excel is termed to be the next level filter option that is available in the particular "Data Menu Tab", which is...

7 minutes read.

Excel AVERAGE() Function

Excel AVERAGE() Function The AVERAGE() function returns the average of its arguments, which can be number or names, arrays, or references that contain numbers. It ignores text values and blank cells. Syntax AVERAGE(Number1,Number2, ...) Parameter Number1(required)- This parameter...

1 minute read.

Application Interface and Key Components

The essential key components of Excel are as follows: Ribbon TabQuick Access ToolbarFormula BarActive CellColumnsRows Name BoxSheet TabsZoom ControlStatus Bar Ribbon Tab: The ribbon includes tabs labeled Home, Insert, Page Layout, Formulas, Data, Review,...

3 minutes read.

Array Formula in Excel

How to use Array Formula in Excel? By default, Excel consists of various formulas for calculating the data. Among various formulas, the Array formula is a powerful one that is used...

8 minutes read.

Excel MID() Function

The MID() function in excel is used to return a specific number of characters from a text string starting at the position you specify. One can change the start of the string, thus...

1 minute read.

Excel RIGHT() Function

The RIGHT() function in excel returns the rightmost characters from a text value. This function is used for data manipulation. Syntax RIGHT(Text, [num_chars]) Parameter Text (required)- This parameter represents the string from which you want to find...

1 minute read.

Dependent Combo box in Excel VBA

Adding the particular dependent box in the created User form with the help of the Microsoft Excel VBA is considered essential and crucial in Microsoft Excel. Here, in this tutorial, we...

7 minutes read.

Data Validation in Excel

What is Data Validation? Data Validation is one of the features in Excel that allows user to restrict values which other people can fill in – for example, in a form, you may...

4 minutes read.

Custom Sort Order in Excel

Microsoft Excel Worksheet is widely used for office, personal and various usages. The data present in the worksheet is a combination of numbers and alphabets. If the worksheet contains more...

3 minutes read.

Excel Nested IF’s Function

Excel Nested IF’s Function This function in excel helps in checking multiple conditions together by using IF conditions within the IF condition. Syntax if(Logical_Test, [value_if_true], if(Logical_Test, [value_if_true] , [value_if_false])) Parameter Logical_Test (required)- This parameter represents the condition which...

2 minutes read.

Excel Unique Values

The Unique function in Excel filters the list of unique values from the given data like range or array. The data presented is either number, text, date, time etc. This...

3 minutes read.

Goal Seek in Excel

Goal Seek in Excel The Goal Seek Excel function in Excel facilitates an automatic solving approach by adjusting a few pointers to reach a required output. Goal seeking is used when you have a value in...

3 minutes read.

Excel COUNT() Function

Excel COUNT() Function The COUNT() function counts the number of cells in a range that contain numbers. Syntax COUNT([value1], [value [2], ...) Parameter value1(required)- This parameter represents the first cell in the range. value2, …(optional)- It represents the...

1 minute read.

Excel LEFT() Function

The LEFT () function in excel returns the leftmost characters from a text value. This function is used for data manipulation. Syntax LEFT(Text, [num_chars]) Parameter Text (required)- This parameter represents the string from which you want to...

1 minute read.