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 sort numbers by first digit in Excel?

Normally, in Excel, the Sort function may help you to sort the numbers in ascending or descending order. But, sometimes, you need to sort the numbers by the first digit as following screenshot shown. This article, I will talk about some tricks for solving this problem.

doc sort by first digit 1  2 doc sort by first digit 2

Sort numbers by first digit with helper column

Sort numbers by first digit with Kutools for Excel quickly and easily


arrow blue right bubble Sort numbers by first digit with helper column


There is no direct way for you to sort the numbers by first digit, you need to apply a formula in a helper column, and then sort the numbers by this helper column, please do as follows:

1. Beside the data column, in the helper column B, please enter this formula: =TEXT(A2,0), and then drag the fill handle down to the cells that you want to apply this formula, see screenshot:

doc sort by first digit 3

2. Both select the two columns and click Data > Sort, in the Sort dialog box, choose the helper column you created from the Column section, and then select Values from the Sort on drop down list, at last specify the sort order, see screenshot:

doc sort by first digit 4

3. Then click OK button, in the Sort Warning box, please select Sort numbers and numbers stored as text separately option, see screenshot:

doc sort by first digit 5

4. And click OK, the numbers have been sorted by the first digit as following screenshot shown:

doc sort by first digit 6

5. At last, you can delete the helper column B as you need.


arrow blue right bubble Sort numbers by first digit with Kutools for Excel quickly and easily

If you have installed Kutools for Excel, with its Advanced Sort function, this job will be solved as quickly as possible.

Kutools for Excel : with more than 300 handy Excel add-ins, free to try with no limitation in 60 days. 

After installing Kutools for Excel, please do as follows:

1. Select the number column that you want to sort by first digit, then click Enterprise > Advanced Sort, see screenshot:

doc sort by first digit 7

2. In the Advanced Sort dialog box, choose the column that you want to sort, and select Values under the Sort On section, then specify the sort order as you need, see screenshot:

doc sort by first digit 8

3. Then click Ok, and the numbers have been sorted by the first digit as you need, see screenshots:

doc sort by first digit 1  2 doc sort by first digit 2

Free Download Kutools for Excel Now!


Recommended Productivity Tools

Ribbon of Excel (with Kutools for Excel installed)

300+ Advanced Features Increase Your Productivity by 71%, 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 82% 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.
    Nelson V · 5 months ago
    Muchas gracias, es un truco realmente útil.
  • To post as a guest, your comment is unpublished.
    sandeep · 7 months ago
    Thanks a lot for this trick(How To Sort Numbers By First Digit In Excel).