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.
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
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.
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 30 days free trial!|
|Kutools for Excel: with more than 300 handy Excel add-ins, free to try with no limitation in 30 days.|
If you have installed the handy tool – Kutools for Excel, you can use its Validate Phone Number feature to only allow users enter SSN number in a fixed formatting.
|Kutools for Excel, with more than 300 handy functions, makes your jobs more easier.|
After free installing Kutools for Excel, please do as below:
1. Select a range or a column as you need, click Kutools > Prevent Typing > Validate Phone Number.
2. In the Phone number dialog, click Add button to create a new format. Then in the Add phone number dialog, give the new format a name in the Name textbox, and type an example of the SSN format you need in the Data case textbox. Lastly, remember to click Generate button.
3. Click OK, a dialog pops out to tell you it is added successfully, click OK to back to the Phone number dialog. Then select the format you have created in last step, then click OK.
4. A dialog pops out to remind you have successfully validated SSN format in the selected cells, click OK to close it.
Now the selected cell only allow entered the SSN format you set, or it pops out a dialog to remind you.
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.
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.