Function Problems

Remove Four Digits from 12-Digit Values in Excel

Amos GikundaAmos Gikunda Dec 2, 2026 869 views

Question details

Convert 12-digit values into 8-digit values by removing four digits from a specified position.

Remove Four Digits from 12-Digit Values in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
The user has a column of 12-digit values and wants to remove four digits from the beginning, end, or middle.
Observed behavior
Each result should retain the eight digits that remain after the unwanted four digits are removed.
Before you start

Identify the position of the four digits to remove and check that it is consistent across the column. If leading zeros matter, ensure the source cells contain the full 12 digits as text rather than relying on number formatting.

Solution 1Recommended

Use a helper column to remove the unwanted digits

Use LEFT and RIGHT formulas to keep the eight digits you need, then replace the original values if desired.

1
Choose an empty cell

Select an empty cell beside the first value, such as B1, assuming the 12-digit value is in A1.

2
Enter the matching formula

To remove the last four digits, enter =LEFT(A1,8). To remove the first four, enter =RIGHT(A1,8). To remove the middle four digits, enter =LEFT(A1,4)&RIGHT(A1,4).

3
Fill the formula down

Press Enter, then drag the fill handle at the bottom-right corner of B1 down the column to apply the formula to the remaining rows.

4
Replace the originals if needed

Select and copy the results in column B. Select the first original cell in column A, then use Home > Paste > Paste Special > Values to replace the originals with the results.

Formula results are text: LEFT and RIGHT return text, which preserves leading zeros. The middle-digit example removes positions 5 through 8; adjust the number of digits kept on each side if the unwanted digits are elsewhere.
Work with spreadsheet values

Remove Four Digits in WPS Spreadsheets

Use LEFT and RIGHT formulas in WPS Spreadsheets to extract the eight digits you need, then paste the results as values.

  1. 1. Open the spreadsheet: Open your Excel file in WPS Spreadsheets and find the column containing the 12-digit values.
  2. 2. Enter a formula: In an empty cell next to A1, enter =LEFT(A1,8) to remove the last four digits, =RIGHT(A1,8) to remove the first four, or =LEFT(A1,4)&RIGHT(A1,4) to remove the middle four.
  3. 3. Apply it to other rows: Press Enter and drag the cell's fill handle down to calculate the remaining results.
  4. 4. Keep the results: Copy the result cells and use Home > Paste > Paste Special > Values if you want to replace the original cells.
Remove digits from the beginning, end, or middle of a valuePreserve leading zeros in text resultsOpen and edit Microsoft Excel XLSX filesFill formulas down a column for multiple rows
microsoft office alternative - wps office

Frequently Asked Questions

How do I remove the first four digits in Excel?

If the 12-digit value is in A1, enter =RIGHT(A1,8) in an empty cell to keep its last eight digits.

How do I remove four digits from the middle?

To remove positions 5 through 8 from A1, enter =LEFT(A1,4)&RIGHT(A1,4). Adjust the counts if the four unwanted digits are in a different position.

Will the formulas preserve leading zeros?

Yes, if the source contains the full value as text. If zeros appear only because of cell formatting, LEFT and RIGHT may not read those displayed zeros.

Can I replace the original cells without a macro?

Yes. Copy the helper-column results, select the original cells, and use Home > Paste > Paste Special > Values.