Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or

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

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


Seconds to list all combinations of two or more lists in Excel

For example, you have two list of values, what you want is to combine these two lists to get all possible combinations as below screenshot shown. In general, you can combine them one by one, but if there are dozens of values needed to combine, this manual method cost much time. In this case, you can try to apply Kutools for Excel's List All Combinations utility, which can quickly generate all combinations of two or more lists you need.  Click for full-featured 60 days free trial!
list combination
 
Kutools for Excel: with more than 300 handy Excel add-ins, free to try with no limitation in 60 days.

Excel Productivity Tools

Office Tab: Bring powerful tabs to Office (include Excel), just like Chrome, Safari, Firefox and Internet Explorer. Save you half the time, and reduce thousands of mouse clicks for you. 30-day Unlimited Free Trial

Kutools for Excel: Save 70% of your time and solve 80% Excel problems for you. 300+ advanced features designed for 1500+ work scenario, make Excel much easy and increase productivity immediately.60-day Unlimited Free Trial



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.


Excel Productivity Tools

Ribbon of Excel (with Kutools for Excel installed)

300+ Advanced Features Increase Your Productivity by 70%, and Help You To Stand Out From Crowd!

Would you like to complete your daily work quickly and perfectly? Kutools For Excel brings 300+ cool and powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) for 1500+ work scenarios, helps you solve 80% Excel problems.

  •  Deal with all complicated tasks in seconds, help to enhance your work ability, get success from the fierce competition, and never worry about being fired.
  •  Save a lot of work time, leave much time for you to love and care the family and enjoy a comfortable life now.
  •  Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands, and give you a healthy body.
  •  Become an Excel expert in 3 minutes, and get admiring glance from your colleagues or friends.
  •  No longer need to remember any painful formulas and VBA codes, have a relaxing and pleasant mind, give you a thrill you've never had before.
  •  Spend only $39, but worth than $4000 training of others. Being used by 110,000 elites and 300+ well-known companies.
  •  60-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years. Buy once, use forever.
  •  Change the way you work now, and give you a better life immediately!

Office Tab Brings Efficient And Handy Tabs to Office (include Excel), Just Like Chrome, Firefox, And New IE

  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Open and create documents in new tabs of same window, rather than in new windows.
  • Help you work faster and easily stand out from the crowd! One second to switch between dozens of open documents!
Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    BHAVIK VIRA · 2 months ago
    I WANT COMBINATION OF 1,2,3,4,5,6,7,8 PLEASE PROVIDE THE EXCEL SHEET

    T
    • To post as a guest, your comment is unpublished.
      Sunny · 29 days ago
      Just try above method, you can do by yourself.
  • To post as a guest, your comment is unpublished.
    Rajeev · 3 months ago
    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!
  • To post as a guest, your comment is unpublished.
    Fábio Ávila · 3 months ago
    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!
    • To post as a guest, your comment is unpublished.
      Sunny · 2 months ago
      Sorry, this is too difficult to execute.
  • To post as a guest, your comment is unpublished.
    jeff · 2 years ago
    hi. thanks for the stuff