How to Remove Dashes in Excel
The fastest way to remove dashes in Excel is Find & Replace: press Ctrl + H (Cmd + Shift + H on Mac), type a hyphen - in the Find what box, leave Replace with empty, and click Replace All. For a formula-based approach that leaves the original data intact, use =SUBSTITUTE(A1,"-",""). Just be careful when removing dashes from SSNs, phone numbers, or ZIP codes — Excel can drop leading zeros or convert the result to scientific notation if it treats the value as a number, so format the column as Text first.
Microsoft Excel is a widely-used spreadsheet program that provides a comprehensive set of tools for managing and analyzing data. One common issue that many users encounter when working with data in Excel is the presence of dashes in cells. These dashes can make it difficult to work with the data effectively and can also affect the accuracy of any calculations or analyses performed on the data. Fortunately, there are several ways to remove dashes in Excel, and in this blog post, we will explore some of the most effective methods.
Method 1: Find & Replace (the fastest method)
The first and simplest method for removing dashes in Excel is the Find & Replace tool. It works on a whole sheet, a selected range, or a single column, and it updates your cells in place. Follow these simple steps:
- Select the range of cells where you want to remove dashes (or skip this to clean the entire sheet).
- Press Ctrl + H to open the Replace dialog. On a Mac, press Cmd + Shift + H, or use Edit → Find → Replace.
- In the Find what box, type a single hyphen
-. Type the plain hyphen from your keyboard, not a typographic en-dash or em-dash — they are different characters. - Leave the Replace with box completely blank.
- Click Replace All. Excel reports how many dashes it removed across the selected range.
If your data contains real dashes inside text you want to keep, select only the column you need before opening the dialog so the change does not spread to the rest of the sheet.
Method 2: Text to Columns function
If the dashes in your Excel sheet are located within a single cell, you can use the Text to Columns function to remove them. Here’s how:
- Select the cell or range of cells containing the dashes.
- Click on the Data tab, then click on the Text to Columns button.
- Choose Delimited as the data type.
- Check the box next to “Other” and type a hyphen
-into the box. - Click Finish and the dashes will be removed, with each value moving into its own column.
Method 3: Trim function
If you only need to remove trailing or leading dashes from your Excel data, you can utilize the Trim function. Here’s how:
- Select the cell or range of cells containing the dashes.
- In another column, insert the formula =Trim(Cell), replacing “Cell” with the cell reference of the data you want to remove dashes from.
- Copy the formula down the entire column.
- The Trim function will remove any trailing or leading spaces or dashes from the cells, leaving you with just the data you need.
Method 4: Find and Replace on a single cell
If you only need to remove a dash from a single cell, you can use the Find and Replace function. Here’s how:
- Select the cell containing the dash.
- Press Ctrl + H on your keyboard to open the Find and Replace window.
- In the Find what box, type a hyphen
-. - Leave the Replace with box blank.
- Click on the Replace All button and the dash will be removed from the cell.
Removing dashes in Excel can significantly improve data accuracy and ease of use. Dashes can be removed from entire ranges of cells or just from single cells. Using the Replace, Text to Columns, Trim, and Find and Replace functions are the most efficient and effective ways to remove dashes.
Method 5: The SUBSTITUTE formula
When you want to keep the original column untouched — for example, when the dashed values are the result of another formula — use the SUBSTITUTE function in a helper column. SUBSTITUTE swaps one piece of text for another, so you replace every dash with an empty string "":
=SUBSTITUTE(A1,"-","")
If A1 contains 123-45-6789, the formula returns 123456789. Copy the formula down the column, then (if you need static values) copy the helper column and use Paste Special → Values to convert the formulas to text. This formula works identically on Windows and Mac.
To strip dashes and spaces in one pass, nest SUBSTITUTE inside itself:
=SUBSTITUTE(SUBSTITUTE(A1,"-","")," ","")
For more ways to clean text this way, see our guide to Excel text functions and how to remove spaces from text in Excel.
Removing only the first or last dash
SUBSTITUTE has an optional fourth argument, instance_num, that tells Excel which occurrence to replace instead of all of them. This is handy when a value uses dashes as separators and you only want to drop one.
- Remove the first dash only:
=SUBSTITUTE(A1,"-","",1)turns2024-05-12into202405-12. - Remove the second dash only:
=SUBSTITUTE(A1,"-","",2).
To target the last dash, count the dashes first and pass that number as the instance:
=SUBSTITUTE(A1,"-","",LEN(A1)-LEN(SUBSTITUTE(A1,"-","")))
The LEN(A1)-LEN(SUBSTITUTE(A1,"-","")) portion counts how many dashes are in the cell, so SUBSTITUTE removes the final one.
Method 6: Flash Fill
Flash Fill recognizes a pattern from an example you type and fills the rest of the column automatically. It is the quickest no-formula option in modern Excel (2013 and later on Windows, and Excel for Microsoft 365 on Mac).
- In the cell next to your first dashed value, type the result you want with the dashes removed (e.g., type
123456789next to123-45-6789). - Press Enter, then start typing the next result. Excel shows a grayed-out preview of the whole column.
- Press Enter to accept, or press Ctrl + E to trigger Flash Fill for the entire column at once.
Because Flash Fill returns text, it sidesteps the number-formatting problems described below — but always spot-check the output, since it infers the pattern rather than following an exact rule.
Important: keep leading zeros and avoid scientific notation
This is the caveat that trips up most people removing dashes from IDs. Numbers like Social Security numbers, phone numbers, and ZIP codes are not really numbers — they are text that happens to contain digits. When you strip the dashes and Excel treats the result as a number, two things break:
- Leading zeros disappear. A ZIP code
07-302becomes7302instead of07302, because Excel drops zeros at the front of a number. - Long values flip to scientific notation. A 16-digit value can display as
1.23457E+15, and Excel may even round digits past the 15th place, permanently corrupting the data.
To avoid both problems, force Excel to treat the values as text before you remove the dashes:
- Select the column, press Ctrl + 1 to open Format Cells, choose Text, and click OK. Then run Find & Replace as in Method 1.
- Or apply a custom number format (Format Cells → Custom) that restores the missing structure — for example
00000for a five-digit ZIP, or000-00-0000if you want the dashes to display without storing them.
If Excel has already mangled your data, our guides on how to stop Excel from changing numbers and how to keep a leading zero in Excel walk through the fixes. And if you later need to put the separators back, see how to add dashes in Excel.
Additional Notes
If you ever need to convert a range of cells into a table, you can do so by selecting the range, clicking on the Insert tab, and selecting Table. This will allow you to easily sort, filter, and format your data. Similarly, if you need to combine data from multiple cells into one, you can use the Concatenate function.
It is important to note that when removing dashes, you should be careful not to inadvertently remove any other important characters or data. Always double-check your work and make a backup copy of your file before making any significant changes.
Final Thoughts
Excel is a powerful tool for managing and analyzing data, and knowing how to remove dashes is a crucial skill for any Excel user. The methods we’ve discussed in this article are simple but effective ways to remove dashes and improve your data quality. With these tools in your Excel toolbox, you can feel confident when working with your data and making important decisions based on your analyses.
Troubleshooting: dashes that won’t go away
If Find & Replace reports “0 replacements” or leaves dashes behind, the most common cause is the character type. The “dash” in your data may be an en-dash (–) or em-dash (—) rather than a plain hyphen (-). Click into the cell, select the dash, copy it, and paste it directly into the Find what box so you match the exact character. The same applies to SUBSTITUTE — replace the actual character your data uses. If dashes still appear after the digits run together, you are likely looking at a display format (Format Cells → Custom showing something like 000-00-0000) rather than stored dashes; change the format to General or Text to confirm.
Frequently Asked Questions
What is the fastest way to remove dashes in Excel?
Find & Replace is fastest. Select your data, press Ctrl + H (Cmd + Shift + H on Mac), type a hyphen - in the Find what box, leave Replace with blank, and click Replace All. It edits cells in place across the whole selection in one step.
How do I remove dashes from an SSN or phone number without losing leading zeros?
Format the column as Text first (select it, press Ctrl + 1, choose Text), then remove the dashes with Find & Replace or SUBSTITUTE. Doing it in this order stops Excel from dropping leading zeros or switching long numbers to scientific notation. See stop Excel from changing numbers for more.
What formula removes dashes in Excel?
Use =SUBSTITUTE(A1,"-",""). It replaces every hyphen in cell A1 with nothing and leaves your original column untouched. Copy it down the column, then Paste Special → Values if you need static results.
How do I remove only the first or last dash instead of all of them?
Use SUBSTITUTE’s fourth argument. =SUBSTITUTE(A1,"-","",1) removes only the first dash. To remove the last one, use =SUBSTITUTE(A1,"-","",LEN(A1)-LEN(SUBSTITUTE(A1,"-",""))), which counts the dashes and targets the final occurrence.
Can I remove dashes without using a formula?
Yes. Flash Fill (Ctrl + E) learns the pattern from one or two examples you type and fills the rest of the column. Find & Replace also works without any formula and edits the cells directly.
Can these methods remove other special characters too?
Yes. Find & Replace, SUBSTITUTE, and Text to Columns work for any character — slashes, parentheses, periods, or letters. Just put the character you want to remove in the Find what box or as the second argument of SUBSTITUTE. Related tasks include splitting one cell into two and removing the last digit from a number.