← All how-to recipes

How to remove specific text from a cell

✓ Verified in LibreOffice 25.8.7.3

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=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. Every formula here is confirmed by actually executing it.