Remove Quotes and Line Breaks from Excel Text
Question details
Remove unwanted quotation marks and line breaks from imported Excel text so values can be compared reliably.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Text imported from another file needs to be cleaned before matching or comparison.
- Observed behavior
- Hidden quotation marks or line breaks may prevent text values from matching as expected.
Identify the cells containing imported text and check whether double quotes and line breaks should be removed or replaced with spaces. If you use a formula, leave an empty column next to the source data for the cleaned results.
Clean imported text with an Excel formula
Use a formula when you want to clean a column while keeping the original text unchanged.
If the imported text is in D2, select an empty cell such as E2 and enter =TRIM(CLEAN(SUBSTITUTE(D2,CHAR(34),""))).
Select E2 and drag its fill handle down alongside the rows you want to clean.
Compare the results in column E, or copy them and use Paste Special > Values if you need fixed text instead of formulas.

Remove double quotes and line breaks with Find and Replace
Use Find and Replace to edit the selected cells directly without adding a formula column.
Remove Quotes and Line Breaks in WPS Spreadsheet
Open your workbook in WPS Spreadsheet and use a cleanup formula to remove double quotes, line breaks, and extra ordinary spaces before comparing imported text.
- 1. Open the workbook: Open WPS Spreadsheet and use Open to select your Excel workbook.
- 2. Enter the formula: If the source text is in D2, select E2 and enter =TRIM(CLEAN(SUBSTITUTE(D2,CHAR(34),""))).
- 3. Fill down: Drag the fill handle from E2 down to clean the remaining imported rows.
- 4. Keep the results: Copy the cleaned cells and use Paste Special > Values if you need to replace formulas with fixed text.

Frequently Asked Questions
Why do imported Excel values look identical but fail to match?
They may contain double quotes, line breaks, or extra spaces. Try =TRIM(CLEAN(SUBSTITUTE(D2,CHAR(34),""))) in an empty cell, then compare the cleaned result.
Can I replace line breaks with spaces instead of deleting them?
Yes. For text in D2, use =TRIM(CLEAN(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(D2,CHAR(34),""),CHAR(10)," "),CHAR(13)," "))) to replace line feeds and carriage returns with spaces before trimming.
How do I remove double quotes without a formula?
Select the cells and open Home > Find & Select > Replace. Enter a double quote in Find what, leave Replace with empty, and select Replace All.
Will the cleanup formula remove curly quotes or nonbreaking spaces?
No. CHAR(34) targets straight double quotes, and TRIM does not remove nonbreaking spaces. Use additional SUBSTITUTE functions for those specific characters if they are present.




