
- MS Excel Basics
- Excel - Home
- Excel - Getting Started
- Excel - Explore Window
- Excel - Backstage
- Excel - Entering Values
- Excel - Move Around
- Excel - Save Workbook
- Excel - Create Worksheet
- Excel - Copy Worksheet
- Excel - Hiding Worksheet
- Excel - Delete Worksheet
- Excel - Close Workbook
- Excel - Open Workbook
- Excel - Context Help
- Editing Worksheet
- Excel - Insert Data
- Excel - Select Data
- Excel - Delete Data
- Excel - Move Data
- Excel - Rows & Columns
- Excel - Copy & Paste
- Excel - Find & Replace
- Excel - Spell Check
- Excel - Zoom In-Out
- Excel - Special Symbols
- Excel - Insert Comments
- Excel - Add Text Box
- Excel - Undo Changes
- Formatting Cells
- Excel - Setting Cell Type
- Excel - Setting Fonts
- Excel - Text Decoration
- Excel - Rotate Cells
- Excel - Setting Colors
- Excel - Text Alignments
- Excel - Merge & Wrap
- Excel - Borders and Shades
- Excel - Apply Formatting
- Formatting Worksheets
- Excel - Sheet Options
- Excel - Adjust Margins
- Excel - Page Orientation
- Excel - Header and Footer
- Excel - Insert Page Breaks
- Excel - Set Background
- Excel - Freeze Panes
- Excel - Conditional Format
- Working with Formula
- Excel - Creating Formulas
- Excel - Copying Formulas
- Excel - Formula Reference
- Excel - Using Functions
- Excel - Builtin Functions
- Advanced Operations
- Excel - Data Filtering
- Excel - Data Sorting
- Excel - Using Ranges
- Excel - Data Validation
- Excel - Using Styles
- Excel - Using Themes
- Excel - Using Templates
- Excel - Using Macros
- Excel - Adding Graphics
- Excel - Cross Referencing
- Excel - Printing Worksheets
- Excel - Email Workbooks
- Excel- Translate Worksheet
- Excel - Workbook Security
- Excel - Data Tables
- Excel - Pivot Tables
- Excel - Simple Charts
- Excel - Pivot Charts
- Excel - Keyboard Shortcuts
- MS Excel Resources
- Excel - Quick Guide
- Excel - Useful Resources
- Excel - Discussion
Generate a random number with the given specific length in Excel
Nowadays most of them use multiple passwords in our day-to-day work. The password may contain different lengths. If you are not willing to set a password then you can use formulas or a tool that is handy to generate random passwords for you. This article gives you some tricks to generate random numbers of your desired length in an Excel workbook.
Random Number in a given specific length using Formula
Random number in a fixed length
Assume that you want to generate a random number string in a 7-digit length using a formula for this you can use the below formula.
=RANDBETWEEN(1000000,9999999)
Click on Enter key to get the 7-digit length as an output.
Kindly note that the output value will be changed every time when you update the Excel workbook.
Random number in a changed length based on the digit number that you type in another cell
For instance, if you want to generate the passwords in different lengths. Type 6 in the cell A4 and enter the below formula in the cell A5 and click on enter it will display a random number in 6-digit length and if you type 9 in the cell A4 with the same formula in cell A5 and clicking on enter it will display a random 9-digit length number. Below is the formula that you need to enter.
=LEFT(RANDBETWEEN(1,9)&RANDBETWEEN(0,999999999999999)&RANDBETWEEN(0,999 999999999999), A4)
Now select A5 in the Excel workbook and enter the above formula.
Now press enter key, A4 cell will display the blank cell or empty cell.
Enter a number 8 in the cell A4 and the same above-mentioned formula in the cell A5 and click on enter key. Then the cell A4 display the 8-digit length as shown in the below screenshot.
In this way you can choose the number you desire to get the random number.
Kindly note that the numbers will be changed when ever you update the Excel worksheet.
This how you will generate random numbers in an Excel workbook using the formulas.
- Related Articles
- Python Generate random string of given length
- How to generate random value from a given list in Excel?
- Generating random string with a specific length in JavaScript
- Excel random data: generate random numbers, texts, dates, times in Excel
- How can I generate random number in a given range in Android?
- Java Program to generate random number with restrictions
- How to generate random character strings in a range in Excel?
- How to generate a random number in C++?
- How to generate a random number in JavaScript?
- How to Generate Random Decimal/Integer Numbers in Excel?
- How to Generate Random Yes or No in Excel?
- How to generate random whole numbers in JavaScript in a specific range?
- C++ Program to Generate a Random UnDirected Graph for a Given Number of Edges
- Generate Random Float type number in Java
- Generate Random double type number in Java
