## How to generate a list of all possible 4 digits combinations in Excel?

Author: Sun Last Modified: 2024-08-29

In some cases, we may need to generate a list of all possible 4 digits combinations of number 0 to 9, which means to generate a list of 0000, 0001, 0002…9999. To quickly solve the list task in Excel, I introduce some tricks for you.

#### A list of all possible 4 digits combinations with formula

In Excel, you can use below formula to list all possible 4 digits combinations of number 0 to 9.

Select a blank cell and type this formula =TEXT(ROW(A1)-1,"0000") into it, and press Enter key, then drag the autofill handle down until all the 4 digits combinations are listing.

#### A list of all possible 4 digits combinations with List All Combinations

With the formula to drag down until all combinations are listed is tedious. However, if you have Kutools for Excel installed, you can use its List All Combinations utility to quickly list all 4 digits combinations.

After installing Kutools for Excel, please do as below:

1. Select a cell, A1, type 0 into it, then go down next cell and type 1 into it. And then select A1 and A2, and drag the autofill handle down until number 9 appears. See screenshot:

2. Then you need to format a column as Text (the column will put the combinations), click at a blank column header, says Column F, and then right click to select Format Cells, and select Text under Number tab in Format Cells dialog, and click OK . See screenshot:

3. Click Kutools > Insert > List All Combinations. See screenshot:

4. A List All Combinations dialog pops out, and you just need to do below operations:

(1) Select Value in the Type list;
(2) Click  to select your number list, (you also can directly type the numbers separated by commas into textbox), and click Add to add the first list into Combinations list;
(3) Repeat step (2) for three times to add other three number lists into Combinations list.

5. Click Ok. Now a dialog pops out to remind you select a cell to put the result, here you need to select the first cell of the column you format as Text.

6. Click OK. Now all the 4 digits combinations of 0-9 are listing.

Click here to know more about List All combinations

#### A List all possible 4 digits combinations with Insert Sequence Number

In Kutools for Excel, you can use Insert Sequence Number to solve this task, too.

After installing Kutools for Excel, please do as below:

1. Select a large range of cells (more than 100000 cells), and click Kutools > Insert > Insert Sequence Number. See screenshot:

2. Then in the Insert Sequence Number dialog, do as below:

(1) Click New to create a new sequence. See screenshot:

(2) Type 0 as the Start number, 1 as the Increment, and 4 as the No. of digits, and check End number option and type 9999 into the textbox. See screenshot:

3. Click Add to add this sequence rule, and then click Fill Range. see screenshot:

Click here to know the details about Insert Sequence Number.

### Best Office Productivity Tools

 🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions… Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ... Super Lookup: Multiple Criteria VLookup  |   Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup .... Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List .... Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ... Featured Features: Grid Focus   |  Design View   |   Big Formula Bar   |  Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells   |  Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ... Top 15 Toolsets:  12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...

#### 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!