How to Remove Everything After a Character in Google Sheets
Learn how to remove everything after a specific character in Google Sheets using LEFT, FIND, SEARCH, and REGEXREPLACE. Practical examples for dash, colon, and comma delimiters, plus tips for errors and edge cases.

In Google Sheets, you can remove everything after a chosen character by combining functions like LEFT, FIND or SEARCH, and IFERROR. This guide shows simple two- to three-step formulas and quick templates you can adapt to your data. No macros required. Start by identifying the delimiter and the column you’re trimming.
Why this skill matters in Google Sheets
According to How To Sheets, mastering how to trim text after a specific character is a foundational data-cleaning skill for Google Sheets. It streamlines imports from external systems, standardizes identifiers, and makes downstream operations like VLOOKUPs and filters predictable. In many student projects and small business dashboards, a single delimiter (for example a dash or a colon) can carry a lot of meaning. Being able to consistently extract the left-hand portion of a string reduces manual edits and errors, and it scales as your datasets grow. The How To Sheets team has observed that teams who automate this trimming step save time and improve data reliability across reports, invoices, and project trackers.
What it means to remove everything after a character
Removing everything after a designated character means you keep only the substring preceding the first occurrence of that delimiter. This is useful when you want to strip away suffixes, dates, version numbers, or descriptive text that accompanies an identifier. The result is a cleaner column that can be sorted, filtered, or joined with other data while preserving the essential portion of the string. It's common in data cleaning for e-commerce SKUs, task IDs, and survey responses.
Common strategies to remove after a character
There are several reliable methods to achieve this, depending on your data and preference for readability. The simplest approach uses LEFT combined with FIND or SEARCH to cut at the first occurrence of a delimiter. For more complex patterns or variable delimiters, REGEXREPLACE or REGEXEXTRACT offer powerful, compact solutions. Each method has trade-offs in readability, robustness, and performance on large datasets. We’ll cover practical examples and explain when to choose which method.
Tools & Materials
- Google Sheets access(Ensure you’re signed in to a Google account with edit access to the sheet.)
- Delimiter character(The character after which everything should be removed (e.g., "-", ":", ",").)
- Target data column(Column containing the text to trim (e.g., column A).)
- Practice dataset(A sample sheet to test formulas before applying to live data.)
- Basic formula references(Knowledge of LEFT, FIND, SEARCH, and IFERROR.)
- REGEX functions (optional)(REGEXREPLACE/REGEXEXTRACT for more advanced patterns.)
Steps
Estimated time: 25-40 minutes
- 1
Identify the data column and delimiter
Locate the column that contains the text you want to trim and confirm the delimiter you’ll remove after. This ensures your formula targets the correct data and avoids accidental edits.
Tip: Double-check data samples with and without the delimiter to validate edge cases. - 2
Write a simple LEFT + FIND formula
Create a helper cell with a formula like =LEFT(A2, FIND("-", A2) - 1). This retains text before the first dash. If the delimiter might not exist, wrap with IFERROR.
Tip: Test with a row that lacks the delimiter to see IFERROR behavior. - 3
Handle missing delimiters safely
Expand the formula to avoid errors when the delimiter is absent: =IFERROR(LEFT(A2, FIND("-", A2) - 1), A2). This keeps the original text if the delimiter isn’t found.
Tip: Consider using SEARCH if you need case-insensitive matching. - 4
Generalize to other columns
Drag the formula down to other rows to apply it across the entire column. Ensure relative references adjust correctly.
Tip: Use absolute references for the delimiter if you want to change it in one place. - 5
Using REGEXREPLACE for uniform rules
If your delimiter appears in various forms, REGEXREPLACE can trim after the first match: =REGEXREPLACE(A2, "-.*$", ""). This keeps text before the dash, no matter what follows.
Tip: Escape special characters correctly in the regex. - 6
Extract without losing content after pattern
To remove everything after a colon regardless of position: =REGEXREPLACE(A2, ":.*$", "").
Tip: Check multiple sample strings to ensure colon-based trimming works consistently. - 7
Compare methods for performance
LEFT+FIND is straightforward but can be slower on very large datasets. REGEXREPLACE is compact and often faster in practice for simple patterns.
Tip: Benchmark with your actual dataset if performance matters. - 8
Apply to an entire dataset
Convert a range (A2:A1000) to the trimmed results by wrapping the formula in an array formula or by filling down. For array formulas: =ARRAYFORMULA(IF(A2:A="","", REGEXREPLACE(A2:A, ":.*$", ""))).
Tip: Be mindful of array formula limits and recalculation times.
FAQ
What is the simplest way to strip text after a specific character in Google Sheets?
Use LEFT in combination with FIND or SEARCH to cut text at the first delimiter. Wrap in IFERROR to handle cells without the delimiter.
Left with FIND is the simplest method. Use IFERROR to handle missing delimiters.
How do I handle cells where the delimiter isn’t present?
Wrap the formula with IFERROR to return the original text if the delimiter isn’t found.
If the delimiter is missing, return the original text.
Can I apply the formula to an entire column automatically?
Yes. Use ARRAYFORMULA to apply a single formula to the entire column, or drag/fill down to copy the formula.
Yes, by using ARRAYFORMULA or dragging,
What if I need to remove after the last occurrence of a character?
Use REGEXREPLACE with a pattern that targets the last occurrence, or use a more complex extraction formula.
Use a regex that targets the last occurrence.
Is REGEXREPLACE always faster than LEFT+FIND?
Performance depends on dataset and pattern; for simple cases LEFT+FIND is very fast, REGEXREPLACE is concise for complex patterns.
Depends on dataset; LEFT+FIND can be faster for simple cases.
What about keeping the delimiter?
If you need to keep the delimiter, adjust the formula to include it in the left portion or use REGEXEXTRACT accordingly.
If you want to keep the delimiter, adjust the formula.
Watch Video
The Essentials
- Master LEFT+FIND for simple delimiters.
- REGEXREPLACE offers flexible trimming with minimal code.
- Use IFERROR to handle missing delimiters gracefully.
- Test formulas on a sample dataset before applying widely.
- Choose the approach based on data size and pattern complexity.
