Function Problems

Extract the Second Digit in Excel with the MID Function

Ayan MasoodAyan Masood Nov 20, 2026 869 views

Question details

Extract the second digit or another character from a cell using Excel's MID function.

Extract the Second Digit in Excel with the MID Function
Product
Microsoft Excel
Device & OS
not provided
Scenario
Analyze digits in numbers or text values for Benford's Law.
Observed behavior
The formula should return the character at the requested position for analysis.
Before you start

Identify the cell containing the value, such as H8, and check whether it contains signs, decimal points, or leading zeros. MID counts characters from the beginning, so the second character is not always the second digit.

Solution 1Recommended

Use MID to extract the second character in Excel

Use this formula when the second character in the source value is the digit you need.

The syntax is MID(text, start_num, num_chars). MID returns the extracted character as text.

1
Select an output cell

Click an empty cell beside the source value, such as I8.

2
Enter the MID formula

Type =MID(H8,2,1) in the selected cell or formula bar, replacing H8 with your source cell, and press Enter.

3
Apply it to other rows

Drag the fill handle at the bottom-right corner of the formula cell down to extract the second character from additional rows.

4
Change the character position

To extract a different character, change the second argument. For example, enter =MID(H8,3,1) to return the third character.

Use MID to extract the second character in Excel
Characters versus digits: A minus sign or decimal point counts as a character. Leading zeros entered as numeric values may be lost; store values as text if those zeros must be preserved.
Analyze digits in WPS Spreadsheet

Extract the Second Character with MID in WPS Spreadsheet

Use the same MID formula in WPS Spreadsheet to extract a character from a number or text value and fill the formula down your data.

  1. 1. Open your spreadsheet: Open WPS Spreadsheet and use Open to select your workbook.
  2. 2. Enter the formula: Click an empty cell, type =MID(H8,2,1), and replace H8 with the cell containing your value.
  3. 3. Extract the character: Press Enter, then drag the cell's fill handle down to apply the formula to other rows.
Extract individual characters for Benford's Law analysisOpen and edit Microsoft Excel XLSX filesFill a formula down a column to process multiple rows
microsoft office alternative - wps office

Frequently Asked Questions

How do I extract the third character instead?

Enter =MID(H8,3,1) in an empty cell. Change H8 to your source cell and adjust 3 to the position you need.

Does MID return a number or text?

MID returns text. If the extracted character is a digit and you need a numeric result, use =VALUE(MID(H8,2,1)).

Why does the formula return a decimal point instead of a digit?

MID counts all characters, including decimal points and minus signs. Check the value in H8 and choose a position that corresponds to the digit you need.

What happens if the value has fewer than two characters?

If the starting position is beyond the end of the value, =MID(H8,2,1) returns an empty text string.