How to Remove Dash in Excel? Easy Guide

👉 Use AI Sheets in Google Sheets to unlock effortless formulas that extract, categorize, and clean your data in seconds.

Overview

Cleaning up data by removing unwanted characters like dashes and hyphens is a common spreadsheet task. Whether you're formatting phone numbers, standardizing product codes, or preparing data for analysis, you often need to eliminate these punctuation marks. While traditional spreadsheet tools require specific functions or manual find-and-replace operations, AI Sheets offers a dramatically simpler approach using natural language instructions.

In this guide, I'll show you how to easily remove dashes, hyphens, and other punctuation marks from your data using AI Sheets' intuitive formulas.

Traditional Dash Removal Challenges

In standard Google Sheets or Excel, removing dashes requires:

  • Using the SUBSTITUTE function with exact character matching
  • Setting up Find & Replace operations
  • Creating custom formatting rules
  • Multiple steps for different types of dashes and hyphens

Entering a dash can be misinterpreted as a minus sign, causing unintended formula actions. It is crucial to format cells correctly to avoid this issue.

For example, a traditional formula to remove dashes might look like: =SUBSTITUTE(A2,"-","")

This becomes more complex when dealing with:

  • Multiple types of dashes (hyphens, en dashes, em dashes)
  • Data with inconsistent formatting
  • Large datasets requiring batch processing
  • The need to selectively remove only certain dashes

The AI Sheets Solution: The GPTTRANSFORM Formula

AI Sheets transforms this process with the =GPTTRANSFORM() formula (also referred to as =TRANSLATE), which lets you clean text using plain English instructions:

=GPTTRANSFORM(A2, "clean text", "remove all dashes and hyphens")

This approach works regardless of:

  • What type of dashes are present
  • Where they appear in the text
  • How many there are
  • What other characters surround them

Getting Started with Dash Removal

Step 1: Sign up at AI Sheets

Step 2: Install AI Sheets

Step 3: Start with =gpt() directly from your Google Sheets

How to Remove Dashes with AI Sheets

Basic Dash Removal

To remove all dashes and hyphens from text: =GPTTRANSFORM(A2, "clean text", "remove all dashes and hyphens")

To enter a hyphen in an Excel cell without causing unintended formatting changes, you can use the CONCATENATE function or the '&' operator to combine text values with hyphens. This method prevents Excel from interpreting the hyphen as a date or other format.

Examples:

  • “123-456-7890” → “1234567890”
  • “Product-ID-123” → “ProductID123”
  • “Jan-Feb-Mar” → “JanFebMar”

Selective Dash Removal

Need to remove dashes only in specific contexts?

=GPTTRANSFORM(A2, "clean phone numbers", "remove dashes only from phone numbers")

Examples:

  • "Call 123-456-7890 on Jan-15" → "Call 1234567890 on Jan-15"
  • "ID: ABC-123, Phone: 555-1234" → "ID: ABC-123, Phone: 5551234"

Replacing Dashes with Other Characters

Want to replace dashes with spaces or other characters? =GPTTRANSFORM(A2, "replace dashes", "replace all dashes with spaces")

Examples:

  • “first-name-last-name” → “first name last name”
  • “2023-04-15” → “2023 04 15”

If you encounter issues with dashes being misinterpreted as minus signs, consider using a single quote as a workaround to ensure that the input is treated as text.

Processing Entire Columns

To remove dashes from a whole column of text:

=GPTTRANSFORM(A2:A100, "clean text", "remove all dashes and hyphens")

This will process all text in the range and return clean versions without dashes, saving you from copying formulas down.

Advanced Dash Processing Scenarios

Handling Different Types of Dashes

AI Sheets intelligently handles various dash types:

=GPTTRANSFORM("Product–ID—123", "clean text", "remove all types of dashes")  // Handles hyphens, en dashes, em dashes

Examples:

  • "en–dash and em—dash" → "endash and emdash"
  • "hyphen-dash" → "hypendash"

Conditional Dash Removal

Remove dashes only when they meet certain conditions:

=GPTTRANSFORM(A2:A100, "clean IDs", "remove dashes only from product IDs but keep them in dates")

Examples:

  • "Order ABC-123 on 2023-04-15" → "Order ABC123 on 2023-04-15"
  • "Ship date: 2023-05-01, Item: XYZ-789" → "Ship date: 2023-05-01, Item: XYZ789"

Smart Formatting

Format specific data types while removing dashes: To format cells and manipulate text appearance, use the following formula: =GPTTRANSFORM(A2:A100, "format phone numbers", "remove dashes from phone numbers and format as (XXX) XXX-XXXX")

Examples:

  • “123-456-7890” → “(123) 456-7890”
  • “555-123-4567” → “(555) 123-4567”

Practical Applications for Dash Removal

Phone Number Standardization

Clean and standardize phone numbers:

=GPTTRANSFORM(A2:A200, "standardize phone numbers", "remove all separators and format as 10 continuous digits")

Then analyze patterns using =GPTASK():

=GPTASK("Identify any phone numbers in column B that don't have exactly 10 digits", A1:B200)

Product Code Cleaning

Remove dashes from product codes:

=GPTTRANSFORM(A2:A500, "clean product codes", "remove all dashes and spaces")

Then create standardized formats with another transformation:

=GPTTRANSFORM(B2:B500, "format product codes", "ensure all codes follow format XX000000 (2 letters followed by 6 digits)")

Date Format Conversion

Convert dates with dashes to another format:

=GPTTRANSFORM(A2:A100, "format dates", "convert dates from YYYY-MM-DD to MM/DD/YYYY format")

Examples:

  • "2023-04-15" → "04/15/2023"
  • "2022-12-31" → "12/31/2022"

Combining with Other AI Sheets Functions

Data Validation After Cleaning

After removing dashes, check for any anomalies:

=GPTASK("Verify that all values in column B are properly formatted without any remaining dashes or special characters", A1:B100)

Extracting Clean Values

Use =GPTEXTRACT() to pull out specific information after dash removal:

=GPTEXTRACT(B2, "product code")  // After removing dashes from "Product-Code: ABC-123"

Creating Clean Data Summaries

Organize your cleaned data into structured tables:

=GPTTABLE("Create a summary of customer information using the cleaned phone numbers from column B", "Customer Name", "Phone Number", "Region", "Status")

Tips for Effective Dash Removal

  1. Be Specific: Clearly describe what types of dashes to remove and from what contexts
  2. Check Results: Verify cleaned data, especially with complex or inconsistent formats
  3. Preserve Original Data: Keep your original data in a separate column before cleaning
  4. Batch Process: Clean entire columns at once rather than individual cells
  5. Format Consistently: After removing dashes, ensure consistent formatting across all data

Beyond Dash Removal

Once you've mastered dash removal, explore other text cleaning capabilities with AI Sheets:

  • Remove other punctuation or special characters
  • Standardize capitalization and spacing
  • Fix common typos and formatting inconsistencies
  • Convert between different number and date formats
  • Extract clean components from messy text

Conclusion

Removing dashes and hyphens doesn't have to involve complex formulas or manual find-and-replace operations. AI Sheets transforms this common data cleaning task into a simple, intuitive process using plain language instructions. Just describe what you want to remove in natural language, and let AI handle the technical details.

Ready to simplify your data cleaning workflows? Get started with AI Sheets today and say goodbye to tedious character removal tasks forever!