Skip to main content

Add dashes to SSN in a cell

This tutorial explains how to add dashes to a social security number in a cell with a formula. Besides, you will learn how to remove dashes from SSN in Excel as well.

Add dashes to SSN
Remove dashes from SSN

Add dashes to SSN

As the below screenshot, there is a column of social security numbers need to be added dashes. You can apply the below formula to get it down.

Generic formula



A1: Represents the cell containing the SSN in which you will add dashes.

How to use this formula?

1. Select a blank cell to output the result. In this case, I select D3.

2. Enter the below formula into it and press the Enter key. And then drag its Fill Handle all the way down to apply the formula to other cells.



  • In the formula, B3 is the cell containing the SSN in which you want to add dashes. You can change it as you need;
  • As the social security numbers are made by 9 digits and displayed as AAA-GG-SSSS commonly, the below easy formula can also help. See the below formula.
    =TEXT(TRIM(B3), "000-00-0000")

How this formula works?


1. LEFT(B3,3): The LEFT function extracts 3 characters from the right side of "253090001" and returns the result as 253.

2. MID(B3,4,2): The MID function extracts 2 characters starting with the fourth character of "253090001". Here the result is 09.

3. RIGHT(B3,4): The RIGHT function extracts 4 characters from the left side of "253090001" and returns the result as 0001.

4. "253"&"-"&"09"&"-"&"0001": Finally we use the & operator to combine "253", "09" and "0001" with character "-". The result is "253-09-0001".

Remove dashes from SSN

It is easy to remove dashes from the social security numbers with the SUBSTITUTE function.

Generic formula



A1: Represent the cell containing the SSN you want to remove dashes from.

How to use this formula?

1. Select a blank cell.

2. Enter the below formula into it and press the Enter key to get the result. Select the result cell again, and then drag its Fill Handle down to apply the formula to other cells.


How this formula works?


The SUBSTITUTE function replaces all dashes in "253-09-0001" with nothing, and returns the result as "253090001".

Related functions

Excel LEFT function
The LEFT function extracts the given number of characters from the left side of a supplied string.

Excel MID function
The MID function is used to find and return a specific number of characters from the middle of given text string.

Excel RIGHT function
The Excel RIGHT function extracts a specific number of characters from the right side of the text string.

Excel SUBSTITUTE function
The Excel SUBSTITUTE function replaces text or characters within a text string with another text or characters.

Related formulas

Remove Extension From File Name
This tutorial provides a formula in detailed steps to help you remove extension from a file name in Excel.

Remove First N Characters From Cell
This tutorial introduces two formulas to help you easily remove the first n characters from a cell in Excel.

Remove Line Breaks From Cells In Excel
This tutorial provides three formulas to help you removing line breaks (which are occurred by pressing Alt + Enter keys in a cell) from specific cells in Excel.

Remove Text From Cell By Matching The Content
This article shows you how to use the SUBSTITUTE function to remove part of text string from specified cells by matching content.

Remove Text From A Cell Based On Specific Position
This tutorial explains how to use formulas to remove text from a cell based on specific position in Excel.

The Best Office Productivity Tools

Kutools for Excel - Helps You To Stand Out From Crowd

Popular Features: Find/Highlight/Identify Duplicates  |  Delete Blank Rows  |  Combine Columns or Cells without Losing Data  |  Round without Formula ...
Super VLookup: Multiple Criteria  |  Multiple Value   |  Across Multi-Sheets  |  Fuzzy Lookup...
Adv. Drop-down List: Easy Drop Down List  |  Dependent Drop Down List  |  Multi-select Drop Down List...
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Unhide Columns  |  Compare Columns to Select Same & Different Cells ...
Featured Features: Grid Focus  |  Design View  |  Big Formula Bar  |  Workbook & Sheet Manager  |  Resource Library (Auto Text)  |  Date Picker  |  Combine Worksheets  |  Encrypt/Decrypt Cells  |  Send Emails by List  |  Super Filter  |  Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolset12 Text Tools (Add Text, Remove Characters ...)  |  50+ Chart Types (Gantt Chart ...)  |  40+ Practical Formulas (Calculate age based on birthday ...)  |  19 Insertion Tools (Insert QR Code, Insert Picture from Path ...)  |  12 Conversion Tools (Numbers to Words, Currency Conversion ...)  |  7 Merge & Split Tools (Advanced Combine Rows, Split Cells ...)  |  Many More...

Kutools for Excel Boasts Over 300 Features, Ensuring That What You Need is Just A Click Away...

Supports Office/Excel 2007-2021 and 365   |   Available in 44 Languages   |   Full-Featured 30-Day Free Trial.

Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)

  • One second to switch between dozens of open documents!
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Firefox, And New Internet Explorer.
Comments (0)
No ratings yet. Be the first to rate!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
Rate this post:
0   Characters
Suggested Locations