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


How to apply data validation to force phone number format in Excel?

May be, there are various phone number formats can be used when typing into the Excel workbook. But, how could you only allow one phone number format to be entered in a column of worksheet? For example, I just want the phone number as this format 123-456-7890 to be allowed entering in a worksheet.

Apply data validation to force phone number format

arrow blue right bubble Apply data validation to force phone number format

To only allow specific phone number format to be entered, you can solve it with the following steps:

First, you can format the cells to the phone number format as you need.

1. Select the list of cells that you want to only type with the specific phone number format, and then right click, choose Format Cells form the context menu, see screenshot:

doc validate phnoe number 1

2. In the Format Cells dialog box, under the Number tab, click Custom from the left Category pane, and then enter the phone number format as you need into the Type text box, in this example, I will use this ###-###-#### format, see screenshot:

doc validate phnoe number 2

3. And then click OK to close the dialog.

Second, you can apply the Data Validation feature to validate the phone number.

4. After formatting the cells, please click Data > Data Validation > Data Validation, see screenshot:

doc validate phnoe number 3

5. In the Data Validation dialog box, under the Settings tab, select Custom from the Allow drop down, and then enter this formula: =AND(ISNUMBER(A2),LEN(A2)=10) into the Formula text box, see screenshot:

Note: In the above formula, A2 is the first cell of the column that you want to validate the phone number.

doc validate phnoe number 4

6. And then click OK button, now, when you enter a 10 digits number, it will be converted to the specific phone number format automatically as you need, see screenshot:

doc validate phnoe number 5

7. And if the number is shorter or longer than 10 digits, a warning message box will appear to remind you, see screenshot:

doc validate phnoe number 6

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.
    mish · 1 years ago
    Hi. I tried this for my data validation. but how come it didn't work on numbers that starts with zero? eg. 012-345-6789
    • To post as a guest, your comment is unpublished.
      a · 1 years ago
      I know it has been 6 months, but here is the answer : The cell is setup to deal with numbers of lenght 10, but a number cannot start with ''0'' (ex: 01 is still 1).

      The cell and formulas used should refer to a string instead and this would fix the problem, but would allow people to have letters and you most likely don't want that.