Function Problems

Excel: Remove a Four-Digit Prefix with RIGHT or MID

Rana GarciaRana Garcia Nov 12, 2026 868 views

Question details

Remove the first four characters from a cell value and return the remaining characters, optionally as a numeric value.

Remove a Four-Digit Prefix in Excel with RIGHT or MID
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.
Before you start

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.

Solution 1Recommended

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.

1
Select the result cell

Click the cell where you want the trimmed value to appear, such as B1.

2
Enter the MID formula

Type =VALUE(MID(A1,5,LEN(A1)-4)) and press Enter. Replace A1 with the cell containing the prefixed value.

3
Fill the formula down

Drag the fill handle from the selected result cell down the column to apply the formula to additional rows.

Use MID to remove the first four characters from a cell
Keep text instead of numbers: If the remaining value must stay as text or can contain leading zeros, remove VALUE and use =MID(A1,5,LEN(A1)-4).
WPS Spreadsheet formula tools

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. 1. Open the worksheet in WPS Spreadsheet: Open your .xlsx or .xls file, then select the first blank cell beside the prefixed values.
  2. 2. Enter a MID formula: Type =VALUE(MID(A1,5,LEN(A1)-4)), replacing A1 with your source cell, and press Enter.
  3. 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. 4. Fill the formula through the records: Drag the fill handle down, or double-click it when an adjacent data column is populated.
Use MID, RIGHT, LEN, and VALUE to trim fixed prefixes from cell values.Apply a formula down an entire column with the fill handle.Open and edit Microsoft Excel .xlsx and .xls files with formula compatibility.Use a lightweight spreadsheet interface with familiar formula editing tools.
microsoft office alternative - wps office

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.