Excel: Remove a Four-Digit Prefix with RIGHT or MID
Question details
Remove the first four characters from a cell value and return the remaining characters, optionally as a numeric value.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A value contains a fixed four-character text or numeric prefix followed by the data that should be retained.
- Observed behavior
- The desired result is the portion of the cell value beginning with the fifth character; numeric results should be converted from text to numbers when needed.
Confirm that every value has exactly four prefix characters before using these formulas. If some prefixes have different lengths, use a formula that identifies the prefix boundary instead of a fixed starting position.
Use MID to remove the first four characters from a cell
Use this method when the value is in a regular cell and its prefix is always four characters long.
MID starts extracting characters at a specified position. Starting at position 5 skips the four-character prefix, and LEN calculates the remaining length automatically.
Click the cell where you want the trimmed value to appear, such as B1.
Type =VALUE(MID(A1,5,LEN(A1)-4)) and press Enter. Replace A1 with the cell containing the prefixed value.
Drag the fill handle from the selected result cell down the column to apply the formula to additional rows.

Use RIGHT for a named Excel table column
Use this formula when the source data is in an Excel table and the column is named WTRF.
Remove Fixed Prefixes with Formulas in WPS Spreadsheet
WPS Spreadsheet supports MID, RIGHT, LEN, and VALUE functions, so you can remove a fixed four-character prefix and convert the remaining characters to numbers using familiar spreadsheet formulas.
- 1. Open the worksheet in WPS Spreadsheet: Open your .xlsx or .xls file, then select the first blank cell beside the prefixed values.
- 2. Enter a MID formula: Type =VALUE(MID(A1,5,LEN(A1)-4)), replacing A1 with your source cell, and press Enter.
- 3. Choose a RIGHT formula for table-style references: If your data uses a WTRF column reference, enter =VALUE(RIGHT([@WTRF],LEN([@WTRF])-4)) in the result column.
- 4. Fill the formula through the records: Drag the fill handle down, or double-click it when an adjacent data column is populated.

Frequently Asked Questions
How do I remove the first four characters in Excel but keep the result as text?
Use =MID(A1,5,LEN(A1)-4). Do not wrap the formula in VALUE, because VALUE converts text that looks like a number into a numeric result.
Why does the formula use 5 as the MID starting position?
Excel counts characters starting at 1. Since characters 1 through 4 are the prefix, character 5 is the first character you want to return.
Can I use RIGHT instead of MID to remove a four-character prefix?
Yes. Use =RIGHT(A1,LEN(A1)-4) for text output, or =VALUE(RIGHT(A1,LEN(A1)-4)) when the remaining characters should be numbers.
What happens if the remaining value begins with zeros?
VALUE removes leading zeros because it returns a number. Use MID or RIGHT without VALUE when values such as 00123 must remain unchanged.
How can I remove a prefix when its length is not always four characters?
A fixed-length MID or RIGHT formula will not be reliable. Use a formula that finds a consistent delimiter or the position where the retained portion begins.




