How to 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.
Prevent duplicate values entering in a column in Excel
|In some times, you want to prevent users to enter duplicate values in a column of Excel sheet, but how can you handle it? The Prevent Duplicate utility of Kutools for Excel just need you to click twice time, the job will be done. Click for 60 days free trial!|
|Kutools for Excel: with more than 200 handy Excel add-ins, free to try with no limitation in 60 days.|
To allow SSN number entered only, just do as these:
1. Select the cells or column you want to type SSN number, right click to select Format Cells from the context menu.
2. In the Format Cells dialog, select Special from Categories pane, and choose Social Security Number from right section.
Or you can select Custom in left pane, then type 000-00-0000 in textbox in the right section.
3. Click OK, then click Data > Data Validation.
4. In the Data Validation dialog, under Settings tab, select Custom from Allow section, type this formula =AND(LEFT(F1,1)>="0",LEN(F1)<10,ISNUMBER(F1)) into the textbox of Formula.
5. Click OK. Now when you type SSN number string into the cells, it will be auto formatted as this:
If number of string are longer than nine characters, it will pop out a warning.
The warning pops out as well while the non-numeric characters entering.
If you just allow number characters entered in a column, you can apply the Prevent Typing utility of Kutools for Excel, which can help you to prevent special character entering or only allow special character entering.
1. Select the cells or column you only allow number entering, click Kutools > Prevent Typing > Prevent Typing.
|Kutools for Excel, with more than 200 handy functions, makes your jobs easier.|
After installing Kutools for Excel, please do as below:（Free Download Kutools for Excel Now!)
2. In the Prevent Typing dialog, check Allow to type in these chars option, and type number 0-9 into the below textbox.
3. Click Ok, there are two reminding dialogs popping out, just click Yes > OK to close them.
Now the selected column only allow numbers enter, if not, a warning dialog will pop out as below screenshot shown.