How to remove the first N characters from a cell
✓ Verified in LibreOffice 25.8.7.3 ✓ Verified in Google Sheets (2026-08-30)Strip a fixed number of characters off the front of a text string (e.g. a prefix).
The formula
| App | Formula | Notes |
|---|---|---|
| Excel (desktop) | =RIGHT(A2,LEN(A2)-3) | Keep everything except the first 3 characters. |
| Google Sheets | =RIGHT(A2,LEN(A2)-3) | Identical. |
| LibreOffice Calc | =RIGHT(A2,LEN(A2)-3) | Identical. |
How it works
LEN(A2) is the total length; subtracting 3 leaves the count after the first three characters, and RIGHT returns that many from the end. 'SKU12345' becomes '12345'. Change 3 to remove a different number of leading characters.
Verified, not just documented
We ran =RIGHT(A2,LEN(A2)-3) in LibreOffice 25.8.7.3 (headless, with forced recalculation) and it returned 12345 — 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 12345 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
RIGHT · LEN — see full Excel, Google Sheets & LibreOffice compatibility for each.
Related recipes
- How to capitalize only the first letter (sentence case)
- How to count characters in a cell
- How to count items in a comma-separated cell
- How to count occurrences of a substring in a cell
- How to count the total words in a range