Remove Four Digits from 12-Digit Values in Excel
Question details
Convert 12-digit values into 8-digit values by removing four digits from a specified position.

- 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.
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.
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.
Select an empty cell beside the first value, such as B1, assuming the 12-digit value is in A1.
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).
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.
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.
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. Open the spreadsheet: Open your Excel file in WPS Spreadsheets and find the column containing the 12-digit values.
- 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. Apply it to other rows: Press Enter and drag the cell's fill handle down to calculate the remaining results.
- 4. Keep the results: Copy the result cells and use Home > Paste > Paste Special > Values if you want to replace the original cells.

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.




