Formatting SSN

Working with Social Security Numbers (SSNs) can be a real pain if you don’t know what you’re doing. Leading zeros may disappear. You may have to deal with some SSNs with dashes (-) and others without. Some SSNS may be formatted with text, others as numbers. All these issues can cause lookup errors or other mistakes.

The best thing to do is standardize all SSNs before doing anything else:
format ssns

The formula above removes “-“s from the SSN, then adds leading zeros (if necessary) and converts the number to text.