# How to Generate Random 10 Digit Number in Excel (6 Methods)

### Method 1 – Combine ROUND and RAND Functions to Generate Random 10 Digit Number

STEPS:

• Enter the following formula in cell C5.
`=ROUND(RAND()*9999999999+1,0)`
• Press Enter.
• It will return a random 10 digits number in cell C5.
• Drag the Fill Handle tool from cell C5 to cell C9.
• We will get the result as shown in the following image.

How Does the Formula Work?

• RAND()*9999999999+1: This part multiplies the random number generated by 9999999999 and adds 1 to it.
• ROUND(RAND()*9999999999+1,0): This part rounds the result that we get from the RAND function.

### Method 2 – Use RANDBETWEEN Function to Create Random 10 Digit Number in Excel

STEPS:

• Enter the following formula in cell C5.
`=RANDBETWEEN(1000000000,9999999999)`
• Press Enter.
• We will get a random 10 digits number in cell C5.
• Drag the Fill Handle tool for the remaining cells.
• The result will be as shown in the following image.

### Method 3 – Generate Random 10 Digit Number Based on Number of Digits You Type in Different Cell

STEPS:

• Select the cells (D5:D9) and enter the following formula.
`=LEFT(RANDBETWEEN(1,9)&RANDBETWEEN(0,999999999999999)&RANDBETWEEN(0,999999999999999), C5)`

• Enter the value 10 in cell C5.
• Press Enter.
• We will get a random 10 digits number in cell D5.

• Enter the value 10 in cells (C6:C9). As a result, we also get random 10 digits numbers in cells (D6:D9).

How Does the Formula Work?

• RANDBETWEEN(0,999999999999999): This part returns a random 10 digit number.
• LEFT(RANDBETWEEN(1,9)&RANDBETWEEN(0,999999999999999)&RANDBETWEEN(0,999999999999999), C5): Returns a random number of fixed digits in cell D5 that we type in cell C5.

### Method 4 – Apply RANDARRAY Function to Generate Random 10 Digit Number

STEPS:

• Enter the following formula in cell C5.
`=RANDARRAY(5,2,1000000000,9999999999,TRUE)`

• Press Enter.
• We will get random numbers in cells (C5:D9).

### Method 5 – Generate10 Digit Number with Analysis Toolpak

STEPS:

• Go to the File tab.

• Select Options from the menu.

• A dialog box named ‘Excel Options’ will pop up.
• Click on the option Add-ins on the left side of the window.
• On the right side, scroll down to the bottom. Select the option ‘Excel Add-ins’ from the drop-down and click on Go.

• This will open a pop-up window with a list of all accessible Excel add-ins. Click OK after checking the box ‘Analysis ToolPak’.

• Select the ‘Data Analysis’ option from the Data tab.

• It will open a new pop-up window named ‘Data Analysis’.
• Scroll down the options in the ‘Analysis Tools’ section. Select the ‘Random Number Generation’ option and click OK.

• We will get a pop-up window named ‘Random Number Generation’. We will input values for different parameters to generate random 10 digits numbers.
• The ‘Number of Variables’ field specifies how many columns we want to fill with random data. We have used the value 1.
• The number of rows is indicated by the ‘Number of Random Numbers’. We have entered the value 5.
• In the Distribution field, we have chosen the option Uniform.
• Set the parameters to a range of 1 to 9999999999.
• Set the ‘Output Range’ to the array’s beginning, which is cell C5.
• Click on OK.

• Random 10 digits numbers will be generated in cells (C5:C9).

### Method 6 – Insert VBA Code to Create 10 Digit Number in Excel

STEPS:

• Right-click on the active sheet and select the option ‘View Code’.

• The above command will open a new blank VBA code window for that worksheet.
• Enter the following code in the code window:
``````Sub Random_10_Digit()
Dim GRN As Integer
For GRN = 5 To 9
ActiveSheet.Cells(GRN, 3) = Round((Rnd() * 9999999999# - 1) + 1, 0)
Next GRN
End Sub``````
• Click on the Run or press the F5 key to run the code.

• We will get 10 digits numbers generated in cells (C5:C9).

<< Go Back to Random Number in Excel | Randomize in Excel Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Mukesh Dipto

Mukesh Dipto is an excellent marine engineer who loves working with Excel and diving into VBA programming. For him, programming is like a superhero tool that saves time when dealing with data, files, and the internet. His skills go beyond the basics, including Rhino3D, Maxsurf C++, AutoCAD, HTML, CSS, JavaScript, and WordPress. He got his B.Sc in Naval Architecture & Marine Engineering from BUET, and now he's switched gears, working as a content developer. In this role, he... Read Full Bio

We will be happy to hear your thoughts

Advanced Excel Exercises with Solutions PDF