How to generate a list of all possible 4 digits combinations in Excel?
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
A list of all possible 4 digits combinations with List All Combinations
List all possible 4 digits combinations with Insert Sequence Number
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.
Kutools for Excel, with more than 300 handy functions, makes your jobs more easier. | ||
After installing Kutools for Excel, please do as below:(Free Download Kutools for Excel Now!)
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
List All Possible 4 Digits 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:(Free Download Kutools for Excel Now!)
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.
Insert All 4 Digits Combinations
Best Office Productivity Tools
Supercharge Your Spreadsheets: Experience Efficiency Like Never Before with Kutools for Excel
Kutools for Excel boasts over 300 features, ensuring that what you need is just a click away...
Supports Office/Excel 2007-2021 & newer, including 365 | Available in 44 languages | Enjoy a full-featured 30-day free trial.
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!


















