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.
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:
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:
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:
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.
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:
7. But if the number is shorter or longer than 10 digits, a warning message box will appear to remind you, see screenshot:
After installing Kutools for Excel, please do as this:
1. Select the range of cells that you want to only specific phone number allow to be entered,then, click Kutools > Prevent Typing > Validate Phone Number, see screenshot:
2. In the Phone number dialog box, select the specific phone number format or you can set your own formatting as you need, see screenshot:
3. Then, click OK button to close the dialog box, now, only the phone number with the formatting can be entered, if the phone number is not the formatting you specified, a warning message will popped out to remind you, see screenshot:
More relative data validation articles:
- Validate Email Addresses In A Column Of Worksheet
- As we all known, a valid email address is composed of three parts, the user name, the "at symbol" (@), and the domain. Sometimes, you just allow others to enter only the email address format text into a specific column of worksheet. Is it possible to achieve this task in Excel?
- Apply Multiple Data Validation In One Cell In Excel
- In Excel worksheet, applying one data validation to a cell may be common for us, but, have you ever tried to use multiple data validation into one cell? This article, I will talk about some different examples for solving this task in Excel.
- Use Data Validation To Only Allow SSN Number Entered In Excel
- For recording the SSN number of all employees and forcing them to type the SSN number in xxx-xx-xxxx format in a column, you can use the Data Validation function to solve the problem.
- Validate Cells To Only Accept IP Address In Excel
- While using Excel, do you know how to set up a column or a range of cells to only accept IP address format (xxx.xxx.xxx.xxx)? This article provides several methods for you to deal with it.
- Data Validation The Date Of Current Year In Excel Worksheet
- In Excel, the Data Validation is a useful feature for us, with it, we can prevent duplicate cells, allow the specific date to be entered, and so on. This article, I will talk about how to allow only the dates of the current year to be entered by using the Data Validation function in Excel worksheet.
Best Office Productivity Tools
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...
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!