How to Remove Dashes in Excel? (6 Easy Methods)
Dashes are very common in Excel data. They appear in phone numbers, social security numbers, product codes, zip codes, and more. But sometimes, those dashes create problems when you are trying to sort data, run formulas, or prepare information for imports. The good news is that Excel gives several ways to remove dashes, depending on the type of data and your goal.
In this guide, we will explain how you can remove dashes using Find and Replace, SUBSTITUTE function, Flash Fill, Text to Columns, and Power Query.
Method 1: Remove Dashes Using Find and Replace
This is one of the quickest ways to remove hyphens inside cells.
Steps
- Select your data range
- Press Ctrl + H to open Find and Replace
- In Find what, type: –
- Leave Replace with empty
- Click Replace All
Excel will instantly remove all dashes inside the selected cells.
This method works well when you want to remove all dashes permanently with no formulas involved.
Method 2: Remove Dashes Using the SUBSTITUTE Function
If you want a formula-based method, the SUBSTITUTE function is great because it keeps your original data unchanged.
Formula
=SUBSTITUTE(A2, "-", "")Where:
- A2 = cell with dashes
- “-“ = find the dash
- “” = replace dash with nothing
Steps
- Enter the formula in a blank column
- Copy down to apply to other rows
- Convert results to values if needed:
- Copy → Right-click → Paste Values
With this method, the updated values are still linked to the original text unless converted to static values.
Method 3: Remove Dashes Using Flash Fill
Flash Fill recognizes patterns in data and fills in the rest automatically. This works best for data like phone numbers and IDs.
Steps
- In a new column, manually type a version of the first value without dashes
- Example: if A2 is 555-222-9999, type 5552229999 in B2
- Go to Data tab
- Click Flash Fill or press Ctrl + E
- Excel will fill the column by following the pattern
If Flash Fill does not activate automatically, ensure that it is enabled:
- File → Options → Advanced → Enable Flash Fill
Flash Fill is fast, but if data format is inconsistent, results may vary.
Method 4: Remove Dashes Using Text to Columns
This method is useful when Excel considers the numbers as text and you want to convert them into actual numbers.
Steps
- Select the column with dashes
- Go to Data tab → Text to Columns
- Choose Delimited → click Next
- Deselect all delimiters → click Next
- Select General as data format
- Click Finish
Excel will refresh the data format and remove unnecessary formatting issues, especially before using formulas.
Method 5: Remove Dashes with Power Query (for large datasets)
If you work with big datasets, Power Query provides a solid transformation approach.
Steps
- Select data → go to Data tab
- Click From Table/Range
- In Power Query editor, select the column
- Go to Transform tab → Replace Values
- Replace
-with empty space - Click Close & Load
Power Query is recommended when importing and cleaning thousands of records regularly.
Method 6: Remove Dashes Using Excel VBA (Automation)
If you need this task repeated often, a simple VBA script can help.
VBA Code Example
Sub RemoveDashes()
Selection.Replace What:="-", Replacement:="", LookAt:=xlPart
End SubHow to use
- Press Alt + F11
- Insert → Module
- Copy/paste the code
- Select your data and run the macro
This will remove dashes from the selected range in one click.
Convert Text to Numbers After Removing Dashes
Sometimes removing dashes still leaves values stored as text. To convert them to numbers:
Option A: Multiply by 1
=A2*1Option B: VALUE Function
=VALUE(A2)Option C: Error Checking
If you see a small green triangle:
- Click the warning icon
- Select Convert to Number
This ensures Excel recognizes them as numeric values for calculations or sorting.
Which Method Should You Use? (Quick Comparison)
| Method | Best For | Skill Level | Keeps Original Data? |
|---|---|---|---|
| Find & Replace | Quick edits on all cells | Beginner | No |
| SUBSTITUTE function | Clean data with formulas | Beginner-Intermediate | Yes |
| Flash Fill | Simple patterns | Beginner | Yes |
| Text to Columns | Fixing text-formatted numbers | Intermediate | No |
| Power Query | Large, repetitive datasets | Intermediate-Advanced | Yes |
| VBA Macro | Automated data cleaning | Advanced | Yes |
If you work with sensitive IDs like SSNs, keeping original values intact using formulas is safer.
Tips to Maintain Clean Data in Excel
- Use Data Validation to prevent unwanted characters
- Convert imported values to proper formats early
- Use Power Query for regular files from external sources
- Always back up data before bulk cleaning
Common Use Cases
You might want to remove dashes in:
| Type of Data | Examples |
|---|---|
| Phone numbers | 555-444-1234 → 5554441234 |
| SSN / Tax IDs | 123-45-6789 → 123456789 |
| Postal codes | 123-45 → 12345 |
| Product codes | ABC-123-XYZ → ABC123XYZ |
| Part numbers | 22-556-9 → 225569 |
Cleaning formatting improves consistency and prevents reporting errors.
Final Thoughts
Removing dashes in Excel is something everyone encounters when working with large spreadsheets, imported files, or business data. Whether you prefer keyboard shortcuts, formulas, or automation, Excel gives many tools to clean data quickly.
For a fast fix, use Find and Replace. If you want a clean and controlled approach, choose the SUBSTITUTE function. Working with thousands of rows? Go with Power Query.
Frequently Asked Questions
How do I quickly remove all dashes in Excel?
The fastest way is to use Find and Replace. Select your cells, press Ctrl + H, type – in the “Find what” box, leave “Replace with” empty, then click Replace All.
How can I remove dashes using a formula in Excel?
You can use the SUBSTITUTE function. For example, =SUBSTITUTE(A2,"-","") removes all dashes from the value in cell A2 and returns a cleaned version.
Why are my numbers still treated as text after removing dashes?
Even after removing dashes, values may stay as text if they were imported or formatted that way. Use VALUE, multiply by 1 (for example, =A2*1), or use Text to Columns to convert them to real numbers.
Can I use Flash Fill to remove dashes from phone numbers?
Yes. Type the first phone number without dashes in a new column, then select the next cell and press Ctrl + E or use Data > Flash Fill. Excel will follow the pattern and remove dashes for the rest.
Will removing dashes affect leading zeros in my data?
Yes, it can. When you convert cleaned text to numbers, leading zeros may disappear. To keep them, format the column as Text first or use a custom number format instead of converting to numeric values.
What is the best method to remove dashes for large datasets?
For large or repeating tasks, tools like Power Query or a simple VBA macro work well. They let you clean and refresh data automatically instead of manually repeating the steps each time.

Vaishvi Desai is the founder of Excelsamurai and a passionate Excel enthusiast with years of experience in data analysis and spreadsheet management. With a mission to help others harness the power of Excel, Vaishvi shares her expertise through concise, easy-to-follow tutorials on shortcuts, formulas, Pivot Tables, and VBA.
