Data Validation Formula for Phone Numbers

Newbienew

Active Member
Joined
Mar 17, 2017
Messages
376
Office Version
  1. 2016
Platform
  1. Windows
I am having an issue with a lot of hands in the pot on the workbook I am working with. One area is the phone number area. Everyone puts it in different and I need it to show up in one format even if it is copied and pasted over with the 123 pasted option. When pasting with that option it takes out cell format. So I thought if i could put a formula that will only allow 10 digits to be entered as well as place it like (123) 456-7890 in a data validation it would work perfect.

Is this possible?
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
So I thought if i could put a formula that will only allow 10 digits to be entered as well as place it like (123) 456-7890 in a data validation it would work perfect.
Perhaps
Select range of cells, go to format cell and in General tab -> custom -> put format->
Code:
(###) ###-####
In Data Validation set "Input Message"
Code:
Please enter phone number like 1234567890
Please see https://www.excelforum.com/excel-formulas-and-functions/943044-data-validation-phone-number.html
 
Last edited:
Upvote 0
I attempted to do that but my issue when people use the copy and paste the Format Cell or Custom is not there any more when they paste the row of information. That is the biggest issue. I'll have 1234567890 (123) 456 7890 123-456-7890. I would like for the format not to change every time
 
Upvote 0
I attempted to do that but my issue when people use the copy and paste the Format Cell or Custom is not there any more when they paste the row of information. That is the biggest issue. I'll have 1234567890 (123) 456 7890 123-456-7890. I would like for the format not to change every time
Data Validation is easily defeated by copy/paste rather than manual input. You could use VBA to prevent the user from using copy/paste, and to accept manual input only if it's in the format of your choice.
 
Upvote 0
Id love to use a VBA but this workbook gets emailed and when it arrives on the other end, the coding seems to not be there.
 
Upvote 0

Forum statistics

Threads
1,214,812
Messages
6,121,696
Members
449,048
Latest member
81jamesacct

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top