Remove Second Hyphen With Excel's SUBSTITUTE Formula

MyExcelOnline MyExcelOnline
  • Start here
  • Blog Blog Excel Excel

    Data analysis spreadsheet

    Arrow Formulas Formulas ArrowArrow Learn Pivot Tables Pivot Tables ArrowArrow Learn Macros & VBA Macros & VBA ArrowArrow Learn Analysis Analysis ArrowArrow Learn Shortcuts Shortcuts ArrowArrow Learn Charts Charts ArrowArrow Learn Power BI Power BI ArrowArrow Learn Copilot Copilot ArrowArrow Word Word

    Document creator

    Arrow PowerPoint PowerPoint

    Presentation software

    Arrow Teams Teams

    Collaboration tool

    Arrow Outlook Outlook

    Email and calendar

    Arrow Access Access

    Database management tool

    Arrow Forms Forms

    Survey and quiz creator

    Arrow OneDrive OneDrive

    Cloud storage service

    Arrow OneNote OneNote

    Digital notebook

    Arrow Power Apps Power Apps

    Custom app builder

    Arrow Automated Power Automate

    Workflow automation tool

    Arrow Project Project

    Project management software

    Arrow Sway Sway

    Interactive presentation creator

    Arrow Visio Visio

    Diagram and flowchart tool

    Arrow Accounting Accounting

    Easy accounting tutorials

    Arrow Podcast Podcast

    Expert Insights on Excel

    Arrow One dollar trial

    $1 Trial for 30 days!

    Cancel Anytime
    • Check 30+ Excel & Office Courses
    • Check Certificates of Completion
    • Check Practice Workbooks
    • Check 5 Amazing Bonuses
    Icon HandIcon Hand Access for $1
  • Courses Courses Beginner Beginner
    Introduction Introduction

    An introduction to Microsoft Excel taking you through the workbook interface, menu ribbon features, entering data into your worksheet and saving.

    Learn More

    Formulas Formulas

    An introduction to Formulas, cell referencing, order of operations, relative v absolute references and exposure to common formulas that will get you up and going fast!

    Learn More

    Formatting Formatting

    Learn the most used formatting features like adding/deleting columns or rows, copying & moving worksheets, font formatting, number formatting and conditional formatting.

    Learn More

    Charts Charts

    Introduction to Images, Shapes, Smart Art & various Charts to spice up your presentations!

    Learn More

    Printing Printing

    Learn how to properly layout your page, print your documents and create custom templates that you can reuse time and time again.

    Learn More

    One dollar trial

    $1 Trial for 30 days!

    Cancel Anytime
    • Check 30+ Excel & Office Courses
    • Check Certificates of Completion
    • Check Practice Workbooks
    • Check 5 Amazing Bonuses
    Icon HandIcon Hand Access for $1 Intermediate Intermediate
    Formulas Formulas

    Learn how to create Named Ranges, the various useful IF formulas, VLOOKUP, HLOOKUP, INDEX & MATCH, OFFSET, INDIRECT, SUMPRODUCT, TEXT formulas, nesting formulas, auditing your formulas and List formulas!

    Learn More

    Pivot Tables Pivot Tables

    Build your must have Pivot Table skills and learn its various powerful data analytic features including: Summarize Values, Group data, Filter & Sort, Slicers, Calculated Fields & Items, Pivot Charts plus Conditional Formatting!

    Learn More

    Macros & VBA Macros & VBA

    An introduction to Macros & VBA, recording Macros, creating Macro buttons and editing your Macros that will save you hours each week!

    Learn More

    Data & Analysis Data & Analysis

    Learn the must know analytical tools within Excel like: Sorting & Filtering, Excel Tables, Data Validation drop down menus, Text to Columns, Flash Fill plus MORE!

    Learn More

    Charts Charts

    Visualize your data with Charts like Column, Bar, Pie, Bubble, Scatter and Sparklines.

    Learn More

    One dollar trial

    $1 Trial for 30 days!

    Cancel Anytime
    • Check 30+ Excel & Office Courses
    • Check Certificates of Completion
    • Check Practice Workbooks
    • Check 5 Amazing Bonuses
    Icon HandIcon Hand Access for $1 Advanced Advanced
    Formulas Formulas

    Advance your Formula skills with various nested formulas, Array formulas and advanced Lookup formulas like VLOOKUP, INDEX/MATCH, OFFSET, SUMPRODUCT plus heaps MORE!

    Learn More

    Pivot Tables Pivot Tables

    Learn the tips that Excel gurus use to analyze their data with a few mouse clicks, create KPIs on you business, interactive Excel Dashboards, learn the GETPIVOTDATA formula plus much MORE!

    Learn More

    Macros & VBA Macros & VBA

    Learn the key VBA concepts to automate your Excel reports & make you more productive, like: Worksheet & Range Objects, Relative References, Modules & Procedures, Variables & Data Types, Conditional Statements & Loops, Message & Input Boxes plus create interactive data entry User Forms! WOW!

    Learn More

    Power Query Power Query

    Learn how to install Power Query, consolidate workbooks & worksheets and create management, clean up your dirty data and transform your data into easy to read reports!

    Learn More

    Power Pivot Power Pivot

    Expand on your Pivot Table knowledge with this super charged add-in! You will learn how to import your data, create relationships, advanced calculations/measures plus various DAX formulas. This is Pivot Tables on STEROIDS!

    Learn More

    Data & Analysis Data & Analysis

    Gain insights on how to use the various data predictive tools like: Goal Seek, Solver, Data Table, Scenario Manager, Relationships and Forecasting!

    Learn More

    Charts Charts

    Expand on your Charting knowledge by learning the advanced Charts, formatting Charts and the new Excel 2016 Charts!

    Learn More

    Power BI Power BI

    Learn Microsoft's most powerful Business Inteligent platform. Power BI is a business analytics service that delivers insights to enable fast, informed decisions. Transform data into stunning visuals and share them with colleagues on any device.

    Learn More

    Excel Dashboards Excel Dashboards

    Learn to create awesome interactive Excel Dashboards that showcase your Key Performance Indicators (KPIs) on one page by using Excel Charts, Formulas, Tables, Form Controls and more!

    Learn More

    Financial Modeling Financial Modeling

    Learn how to create a Financial Model using the core Excel concepts & formulas, learn various Financial Modeling skills and create a real life Financial Model business case with Profit & Loss, Cash Flow, NPV, IRR, payback periods, scenario analysis plus MUCH MORE!

    Learn More

    One dollar trial

    $1 Trial for 30 days!

    Cancel Anytime
    • Check 30+ Excel & Office Courses
    • Check Certificates of Completion
    • Check Practice Workbooks
    • Check 5 Amazing Bonuses
    Icon HandIcon Hand Access for $1 Microsoft Microsoft
    Word Word

    Use Microsoft Word to create business letters, business cards, resumes, product manual, reports, flyers, restaurant menus, invitation cards, labels, forms, and many more.

    Learn More

    PowerPoint PowerPoint

    Microsoft PowerPoint is your tool to create slides for your presentations. PowerPoint supports audio, videos, and animation effects to help you give your presentation greater impact.

    Learn More

    Outlook Outlook

    Microsoft Outlook is a powerful email client used by most corporate enterprises in the world. It also includes such functions as calendaring, task managing, contact managing, note-taking, journal logging and web browsing.

    Learn More

    OneNote OneNote

    Microsoft OneNote is a feature-rich note-taking application. OneNote keeps your notes, plans, and thoughts all in one place. You create sections, pages, and sub-pages just like a tradition paper notebook and use color codes to organize your notes.

    Learn More

    Teams Teams

    Microsoft Teams is a feature-rich and secure collaboration and communication application. It supports instant message/chat, audio calls, video conferencing, and collaboration features. Other features include the ability to host meetings with thousands of participants, record your meetings, and to share your screen for when you are hosting a training session.

    Learn More

    Access Access

    Microsoft Access is an application used to create databases to store and manage your business data. It provides you with tools to create data tables, queries, forms, reports, and tools to help you write Visual Basic codes to customize the functionality of your database application.

    Learn More

    SharePoint SharePoint

    Microsoft SharePoint is a cloud-based application used to build intranet websites to share and management information and collaborate with others within your organization. Features of SharePoint can be used to create as a document management tool, a knowledge base, a management workflow, a calendar of events, a ticketing system, and much more.

    Learn More

    Project Project

    Microsoft Project is a powerful and popular tool to plan and manage projects. It provides the tools to management tasks, dependencies, milestones, Gantt chart and more.

    Learn More

    Visio Visio

    Microsoft Visio is a diagramming and vector graphics application. You can create diagram types such as Flowcharts, Org Charts, Floor Plans, Network Diagrams, UML Diagrams, Mind maps and more.

    Learn More

    Power Automate Power Automate

    Formerly Flow, Microsoft Power Automate is a cloud-based tool to help organizations develop workflows to automate tasks and processes. It's a useful tool to help bring automation to repetitive tasks, such as approval workflows, data collecting, or synchronize files between applications.

    Learn More

    Power Apps Power Apps

    Microsoft Power Apps is a collection of tools to help you build customized web-based and mobile apps to meet your business needs. It's biggest benefits are automation and workflow. These enable businesses to improve productivity and processes, streamline tasks, and minimize the use of paper.

    Learn More

    Forms Forms

    Microsoft Forms is a web-based application that allows you to create forms to collect data and feedback from users, such as surveys, questionnaires and polls.

    Learn More

    One dollar trial

    $1 Trial for 30 days!

    Cancel Anytime
    • Check 30+ Excel & Office Courses
    • Check Certificates of Completion
    • Check Practice Workbooks
    • Check 5 Amazing Bonuses
    Icon HandIcon Hand Access for $1 Member Login Member Login
  • Corporate
  • Shop Shop $19.00 $38.00 101 Excel Formulas
    101 Most Popular Excel Formulas
    101 Most Popular Excel Formulas

    Learn the Most Popular Excel Formulas Ever: XLOOKUP, VLOOKUP, IF, SUMIF, INDEX/MATCH, COUNT, SUMPRODUCT plus Many More!

    Shopping CartShopping Cart Buy E-Book (50% OFF) Amazon LogoAmazon Logo Buy at Amazon $19.00 $38.00 101 Excel Pivot Tables
    101 Ways to Master Excel Pivot Tables
    101 Ways to Master Excel Pivot Tables

    Master Excel Pivot Tables in a Flash: Customizations, Calculations, Grouping, Sorting, Filtering, Slicers, Calculated Fields/Items, Pivot Charts, Dashboards, Conditional Formatting, Getpivotdata Plus Many More!

    Shopping CartShopping Cart Buy E-Book (50% OFF) Amazon LogoAmazon Logo Buy at Amazon $19.00 $38.00 101 Excel Macros
    101 Ready To Use Excel Macros
    101 Ready To Use Excel Macros

    Access 101 Ready To Use Macros with VBA code which you can Copy & Paste to your workbooks straight away

    Shopping CartShopping Cart Buy E-Book (50% OFF) Amazon LogoAmazon Logo Buy at Amazon
    Ultimate Debt Repayment Tracker
    $19.00 $38.00 Excel Ultimate Debt Repayment Tracker

    ⭐⭐⭐⭐⭐Easily create a debt repayment schedule using 3 fully automated debt repayment strategies (snowball, avalanche or custom)!

    • ✓ Gain Complete Debt Transparency
    • ✓ Minimize Debt Strain
    • ✓ Reach Debt Milestones
    • ✓ Editable in Microsoft Excel (All Versions)
    Shopping CartShopping Cart Buy Now! (50% OFF)
    Ultimate personal finance tracker
    $19.00 $38.00 Excel Ultimate personal finance tracker

    ⭐⭐⭐⭐⭐Track your Income, Savings, Expenses and Debts with the ULTIMATE Personal Finance Tracker!

    • ✓ Gain Complete Financial Transparency
    • ✓ Minimize Financial Strain
    • ✓ Reach Financial Milestones
    • ✓ Editable in Microsoft Excel (All Versions)
    Shopping CartShopping Cart Buy Now! (50% OFF)
    Ultimate small Business Bookkeeping tracker
    $19.00 $38.00 Excel Ultimate small Business Bookkeeping tracker

    ⭐⭐⭐⭐⭐ Easily manage your small business Income & Expenses with this fully automated bookkeeping tracker!

    • ✓ Gain Complete Business Transparency
    • ✓ Minimize Business Strain
    • ✓ Reach Business Milestones
    • ✓ Editable in Microsoft Excel (All Versions)
    Shopping CartShopping Cart Buy Now! (50% OFF)
  • Consulting
  • Login
  • All Microsoft Excel Word Outlook PowerPoint Access OneNote Teams PowerAutomate Power Apps Visio Project Forms OneDrive
Free Excel eBook Free Excel eBook Remove Second Hyphen with Excel’s SUBSTITUTE Formula Bryan Free Practice Workbook
There are times where I needed to remove the nth occurrence from my text.
 For example, I would like to how to remove dashes in Excel - it's 2nd occurrence.Normally I would have to find the second hyphen, split the text based on the hyphen's location, merge the remaining parts together....pfff....it's just a headache and prone to errors!! The SUBSTITUTE formula in Excel can actually do this for you! You might be thinking, "How can substitute remove dash in Excel?" The secret is, we use SUBSTITUTE to replace our target character with an empty string!

There are times where I needed to remove the nth occurrence from my text.  For example, I would like to how to remove dashes in Excel – it’s 2nd occurrence. Normally I would have to find the second hyphen, split the text based on the hyphen’s location, merge the remaining parts together….pfff….it’s just a headache and prone to errors!! The SUBSTITUTE formula in Excel can actually do this for you! You might be thinking, “How can substitute remove dash in Excel?” The secret is, we use SUBSTITUTE to replace our target character with an empty string!

Key Takeaways

  • SUBSTITUTE Can Target Specific Occurrences – The SUBSTITUTE function allows you to replace only a specific instance of a character or text string, like the second hyphen in a cell.

  • Useful for Cleaning Structured Data – If your data uses delimiters like hyphens or dashes (e.g., IDs or phone numbers), you can clean or format them precisely without affecting the rest.

  • Syntax is Straightforward – The formula follows this structure:=SUBSTITUTE(text, old_text, new_text, [instance_num])

  • Replace with Blank to Remove – Use "" (empty quotes) as the new_text if you simply want to remove the character rather than substitute it with another.

  • Pairs Well with Other Functions – Combine SUBSTITUTE with functions like LEN, FIND, or TEXTSPLIT to create more advanced data transformation formulas.

Quick Overview

Let’s get familiar with the syntax of the Substitute Function in Excel!

What does it do?

Substitutes new_text for old_text in a text string.

Formula breakdown:

=SUBSTITUTE(text, old_text, new_text, [instance num])

What it means:

  • text – the cell that contains the character you want to substitute
  • old_text – the character you want to change
  • new_text – the new character you want to place
  • [instance num] – the occurrence of the old text you want to replace

How to Remove Second Hyphen with Excel’s SUBSTITUTE Formula

In our example below, we have a list of part numbers and we want to remove the second dash. So, the part number C97-27-JT should be C97-27JT!

STEP 1: We need to enter the Substitute function next to the cell that we want to clean the data from:

=SUBSTITUTE

Remove Second Hyphen with Excel's SUBSTITUTE Formula

STEP 2: Enter the first argument of the SUBSTITUTE function: text

Which text do we want to change?

Reference the cell that contains the text or value:

=SUBSTITUTE(C9,

Remove Second Hyphen with Excel's SUBSTITUTE Formula

STEP 3: Enter the second argument of the SUBSTITUTE function: old_text

Which text/characters do we want to replace?

We want to remove the dash    so type it in with double quotations:

=SUBSTITUTE(C9, “-“,

Remove Second Hyphen with Excel's SUBSTITUTE Formula

STEP 4: Enter the third argument of the SUBSTITUTE function: new_text

Which text/characters do we want to replace it with?

We want to remove this, so just type in a blank value:

=SUBSTITUTE(C9, “-“, ,

Remove Second Hyphen with Excel's SUBSTITUTE Formula

STEP 5: Enter the fourth argument of the SUBSTITUTE function: [instance num]

Which specific instance are we targeting the substitution on?

This parameter is optional.  In our scenario, we only want the second dash to be removed.

So place in the number 2 (as it is the 2nd instance the dash is located):

=SUBSTITUTE(C9, “-“, , 2)

Remove Second Hyphen with Excel's SUBSTITUTE Formula

One thing you need to keep in mind is that if you ignore this argument, every occurrence of the old text will be changed to the next text.

Let’s try it!

=SUBSTITUTE(C9, “-“, ,)

Remove Second Hyphen with Excel's SUBSTITUTE Formula

STEP 6: Do the same for the rest of the cells by dragging the SUBSTITUTE formula all the way down using the left mouse button.

Note that all of the parts are now changed to your new part values:

Remove Second Hyphen with Excel's SUBSTITUTE Formula

In this way, you can easily remove the 2nd occurrence of hyphens in Excel. This completes our tutorial on how to remove hyphen in Excel using the SUBSTITUTE function.

Following the steps mentioned above, you can easily change the nth occurrence of an old text with a new one.

Frequently Asked Questions

How do I remove only the second hyphen from a text string?Use =SUBSTITUTE(A1, "-", "", 2) to remove just the second hyphen from the value in cell A1.

What if my string has fewer than two hyphens?If the second hyphen doesn’t exist, the SUBSTITUTE function won’t change the text—it simply returns the original string.

Can I replace the second hyphen with another character instead of removing it?Yes, just change the "" to the character you want. For example, =SUBSTITUTE(A1, "-", "/", 2) replaces the second hyphen with a slash.

Does SUBSTITUTE change all hyphens by default?If you don’t specify the optional 4th argument, it replaces all instances. Use the 4th argument to target only the 2nd, 3rd, etc.

Can I use SUBSTITUTE inside other functions?Absolutely! It works well within IF, LEFT, RIGHT, and TEXT functions to format or evaluate data conditionally.

If you like this Excel tip, please share it XFacebookLinkedInCopyEmailSharePrintReddit

Bryan

Bryan Hong is an IT Software Developer for more than 10 years and has the following certifications: Microsoft Certified Professional Developer (MCPD): Web Developer, Microsoft Certified Technology Specialist (MCTS): Windows Applications, Microsoft Certified Systems Engineer (MCSE) and Microsoft Certified Systems Administrator (MCSA).

He is also an Amazon #1 bestselling author of 4 Microsoft Excel books and a teacher of Microsoft Excel & Office at the MyExecelOnline Academy Online Course.

See also Top 3 Methods to Find Special Characters in Excel

Steps To Follow

  • Free Practice Workbook
  • Quick Overview
  • How to Remove Second Hyphen with Excel’s SUBSTITUTE Formula
  • Frequently Asked Questions
Excel Formulas & Functions TutorialsSUBSTITUTE Formula in ExcelText Formulas in Excel
30+ Excel & Office Courses
One Dollar Trial

$1 Trial for 30 days

Access for $1

Cancel Anytime

Related Articles

How to ConvertGMT Time Zone to CST in Excel – Step by Step Guide

How to Convert GMT Time Zone to CST in Excel – Step by Step Guide September 30, 2025

How to GenerateRandom Numbers 1-20 in Excel – Step by Step Guide

How to Generate Random Numbers 1-20 in Excel – Step by Step Guide September 29, 2025

How to CalculateGolf Handicap in Excel – Step by Step Guide

How to Calculate Golf Handicap in Excel – Step by Step Guide September 26, 2025

Star 30 Days - Full Access Star

One Dollar Trial

$1 Trial for 30 days!

Access for $1

Cancel Anytime

One Dollar Trial
  • Get FULL ACCESS to all our Excel & Office courses, bonuses, and support for just USD $1 today! Enjoy 30 days of learning and expert help.
  • You can CANCEL ANYTIME — no strings attached! Even if it’s on day 29, you won’t be charged again.
  • You'll get to keep all our downloadable Excel E-Books, Workbooks, Templates, and Cheat Sheets - yours to enjoy FOREVER!
  • Practice Workbooks
  • Certificates of Completion
  • 5 Amazing Bonuses
Satisfaction Guaranteed Accepted paymend methods Secure checkout

Get Video Training

Advance your Microsoft Excel & Office Skills with the MyExcelOnline Academy!

Dramatically Reduce Repetition, Stress, and Overtime! Exponentially Increase Your Chances of a Promotion, Pay Raise or New Job! Learn in as little as 5 minutes a day or on your schedule.

Learn More! Video Training: Formulas Video Training: Power Pivot Video Training: Macros & VBA Video Training: Charts Video Training: Power Query Video Training: Pivot Tables Previous Next Share to...BufferCopyEmailFacebookFlipboardHacker NewsLineLinkedInMastodonMessengerMixPinterestPocketPrintRedditSMSTelegramThreadsTumblrXVKWhatsAppXingYummly

Tag » How To Remove Dashes In Excel