Skip to main content

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

Author: Sun Last Modified: 2020-04-28

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 good idea3

List all possible 4 digits combinations with Insert Sequence Number good idea3


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.

doc list 4 digits combinations 1


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:

doc list 4 digits combinations 2

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:

doc list 4 digits combinations 3

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

doc list all digits combinations 12

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 doc button 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.

doc list 4 digits combinations 12

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.

doc list 4 digits combinations 6

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

doc list 4 digits combinations 7

Click here to know more about List All combinations


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:

doc list all digits combinations 13

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

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

doc list 4 digits combinations 9

(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:

doc list 4 digits combinations 10

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

doc list 4 digits combinations 11

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 Toolsets12 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...

Description


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!
Comments (20)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hi everyone, how I can generate a list of 4 digits passcode where the 2nd number will always be 7 and the last number will always be 6
X7X6
This comment was minimized by the moderator on the site
Il primo metodo con la formula non funziona. Mi dice che gli elementi della formula sono insufficienti e sono sicura di aver scritto correttamente
This comment was minimized by the moderator on the site
Hi, Sara Cutelli, the formula provided only work for English version, may be you can try this formula =TESTO(RIF.RIGA(A1)-1;"0000")
This comment was minimized by the moderator on the site
For simplicity, lets say my values are letters, there are 16 of them.

a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p

I need all 3 letter sets, except no repeated letters.
And I also do not need different order sequences, example: I do not need all of these, just one: abc, bca, cab, acb, bac.
How would I get this?
This comment was minimized by the moderator on the site
Hi, I found a code for solving your job. You can view this tutorial, How to list all possible combinations from single column in Excel? the second method may help you.
This comment was minimized by the moderator on the site
Sorry, I have not found any solution for yor question.
This comment was minimized by the moderator on the site
36930.15
87000
62974
56812.54
44475
40500.23
38925
38250
35571.52
34049.98
27272
26100
24975
22050
20025
19811.03
18450
16650
15000
15000
15000
15000
15000
15000
15000
15000
15000
15000
15000
15000
13933.01
13857.55
10951
10687.04
7650
7546.77
6823.96
5922
5834.333
5732
5411
3083
1851
1217.46
1100
1017.7
40


i WANT MAXIMUM COMBINATION VALUE HOW DO I GET IN EXCEL
This comment was minimized by the moderator on the site
Hi, SACHIN, you can use the List all combination utility of Kutools for Excel to list all combinations, then use the Select cells with max or min value utility of Kutools for Excel to find tge maximum combination value.
This comment was minimized by the moderator on the site
hi from numbers 1 to 8 how many mixed 4 number combinations do i get
This comment was minimized by the moderator on the site
Hi,dinesh,just try the third method, you can get the final result by yourselft.
This comment was minimized by the moderator on the site
I WANT COMBINATION OF 1,2,3,4,5,6,7,8 PLEASE PROVIDE THE EXCEL SHEET

T
This comment was minimized by the moderator on the site
Just try above method, you can do by yourself.
This comment was minimized by the moderator on the site
I have a question! How to list all possible combination of numbers? For example, I have these numbers: 2, 2, 2, 1, 0. I want to generate all possible combinations of these five numbers. For example 22210, 10222, 21220, 20122, 21022... and so on. Please help!
This comment was minimized by the moderator on the site
Dear Frıend.
5 number permutations that what you want
Not combonatıons
If you know Mıctosoft365 Excel you can easyly create one changing dıgıts
Have z nıce day
This comment was minimized by the moderator on the site
Hello. Thanks for the List All combinations tool. However, some combinations exceed the total number of rows excel can offer in a given column (1,048,576). Is it possible to let the list continue in another column within the same sheet? Or even have the tool in word or text which doesn't limit the rows? I appreciate your feedback!
This comment was minimized by the moderator on the site
Sorry, this is too difficult to execute.
This comment was minimized by the moderator on the site
Hi Mr.Sunny can u sove this I have 1,2,3....22 but I pick only any 11 Numbers order not matter what are the list of possibilities
This comment was minimized by the moderator on the site
you can create all the possibilities of a group of numbers in the number program mobile app.
This comment was minimized by the moderator on the site
Hi, dharmendar, you can try to use Kutools for Excel‘s Select and Sort Randomly feature to select 11 numbers randomly from the 1,2,3...22 list.
This comment was minimized by the moderator on the site
hi. thanks for the stuff
There are no comments posted here yet
Leave your comments
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations