- To post as a guest, your comment is unpublished.· 2 months agoHello, Rach,
To solve your problem, you just need to use this ## #### #### format in the Format Cells dialog box in step 2. And then follow the above other steps one by one. At last, when you enter a 10 digits number, it will be converted to the phone number format you need automatically.
Please try, hope it can help you!
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:
If you have Kutools for Excel, with its Validate Phone Number feature, you can specify the phone number formatting that you just want to enter in a worksheet.
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.
You are guest
or post as a guest, but your post won't be published automatically.
- To post as a guest, your comment is unpublished.· 2 months agoHi, I know it could be different but how can i validate a country code in front of the phone number for different countries? Eg, ISO code shows 65 for Singapore and phone number format must be 65 6123 4567 or 82 for Korea and phone number format is 82 1234 4567. Without any symbols. Appreciate your help.
- To post as a guest, your comment is unpublished.· 2 years agoHi. 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.· 2 years agoI 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.