← All how-to recipes

How to remove specific text from a cell

✓ Verified in LibreOffice 25.8.7.3 ✓ Verified in Google Sheets (2026-08-30)

Strip a known word, code, or symbol out of text — clean up "USD 45" to "45", drop a prefix, delete a label.

The formula

AppFormulaNotes
Excel (desktop)=SUBSTITUTE(A2,"USD ","")Replaces the target with nothing. Add a 4th argument to remove only the Nth occurrence.
Google Sheets=SUBSTITUTE(A2,"USD ","")Identical; REGEXREPLACE(A2,"USD ","") also works in Sheets.
LibreOffice Calc=SUBSTITUTE(A2,"USD ","")Identical.

How it works

SUBSTITUTE swaps every copy of the target text for a replacement; making the replacement an empty string "" deletes it — "USD 45.00" becomes "45.00". It's case-sensitive, so "USD" won't match "usd". Nest SUBSTITUTE to remove several different strings at once: =SUBSTITUTE(SUBSTITUTE(A2,"(",""),")",""). Note the result is still TEXT even if it looks numeric — wrap in VALUE() if you need to calculate with it. To remove by POSITION rather than by content, use REPLACE instead.

Verified, not just documented

We ran =SUBSTITUTE(A2,"USD ","") in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned 45.00 — exactly the expected result. We then ran the same formulas in Google Sheets, executed 2026-08-30: a formula-only workbook goes into Google Drive, which converts it to a Sheet and recalculates every formula with Google’s own engine, and comes back out as .xlsx carrying the values Google computed. It returned 45.00 for the worked example, the same value LibreOffice produced. Both engines’ numbers on this page are executed results. The Excel formula follows Microsoft’s official documented syntax — we do not run desktop Excel.

Functions used

SUBSTITUTE — see full Excel, Google Sheets & LibreOffice compatibility for each.

Related recipes

Related comparisons