How to Find and Replace Tab Characters in Excel 365
Question details
The user needs a reliable method to identify and replace hidden tab characters within cell text, as the standard Find and Replace tool does not easily recognize them.

- Product
- Microsoft Excel 365
- Device & OS
- not provided
- Scenario
- Cleaning up imported data or text strings that contain unwanted, invisible tab formatting.
- Observed behavior
- The standard Ctrl+F or Ctrl+H dialog fails to easily detect or accept tab characters, requiring a formula-based workaround to clean the text.
Before applying these formulas, ensure your data does not contain other non-printing characters like line breaks (CHAR(10)) that might also need cleaning. It is recommended to test these functions in an adjacent blank column to preserve your original data during the process.
Replace All Tab Characters Using the SUBSTITUTE Function
This method is best when you want to remove or replace every instance of a tab character within a specific cell.
The SUBSTITUTE function searches a text string for a specific character and replaces all occurrences of it with a new character. In Excel, the CHAR(9) function represents the horizontal tab character.
Click on a blank cell adjacent to the cell containing the tab characters (for example, cell C4 if your data is in B4).
Type the formula =SUBSTITUTE(B4, CHAR(9), " ") into the formula bar. This tells Excel to look into cell B4, find all tab characters, and replace them with a single space.
Press Enter to see the cleaned text. Click the newly filled cell and drag the fill handle (the small square at the bottom right corner) down to apply the formula to the rest of your dataset.

Replace Only the First Tab Character Using REPLACE and FIND
Use this approach if you only want to change the very first occurrence of a tab character while leaving any subsequent tabs intact.
Find and Replace Tab Characters Effortlessly with WPS Office
WPS Spreadsheet offers full support for standard Excel functions including SUBSTITUTE, REPLACE, and CHAR. You can seamlessly clean up messy imported data, remove hidden tab characters, and format your spreadsheets for free using the exact same formulas.
- 1. Open your spreadsheet: Launch WPS Office, open your spreadsheet, and select a blank column next to the data you need to clean.
- 2. Enter the formula: Type =SUBSTITUTE(A1, CHAR(9), " ") to replace all tab characters with spaces, then press Enter.
- 3. Fill the column: Drag the fill handle at the bottom right corner of the cell to apply the formula across multiple rows.
- 4. Replace original data: Copy the new column, right-click the original data column, and select 'Paste Special' > 'Values' to permanently save the cleaned text.

Frequently Asked Questions
Can I use the standard Find and Replace (Ctrl+H) dialog for tab characters in Excel?
The standard Find and Replace dialog in Excel does not easily accept tab character inputs from the keyboard. Using functions like SUBSTITUTE with CHAR(9) is the most reliable and efficient workaround.
What does CHAR(9) mean in Excel formulas?
CHAR(9) is the formula representation of the standard ASCII character code for a horizontal tab. It allows you to accurately reference the invisible tab character inside Excel formulas.
How do I remove tab characters instead of replacing them with a space?
To completely remove the tab character without adding a space, change the last argument of the SUBSTITUTE formula to an empty string, like this: =SUBSTITUTE(B4, CHAR(9), "").




