What Is MID Function In Google Sheets?
MID function in Google sheets, as the name suggests, helps users find the middle values from the given text string. It is a default function, available in both Excel and Google sheets. MID function can be used with other functions such as SEARCH, TRIM, LEN Google functions also. This function is grouped under the TEXT functions in both Excel and Google sheets.
For example, consider the below table showing a proverb, ‘Health is wealth’ in column A.

Now, let us learn how to find the mid values using the MID function.
To begin with, we need to insert the data and click on the cell where we want to find the result. Next, insert the MID function formula with arguments. So, the complete formula is =MID(A2,10,7) and press Enter key.
We will be able to see the result in cell B2, as shown in the below image.

Likewise, we will be able to use the MID function to find the middle values.
In this article, let us learn how to use the MID function to find the result with detailed examples.
Key Takeaways
- MID function in Google sheets helps users find the middle values from the given data string.
- The formula of MID function in Google sheets is =MID(string,starting_At,extract_length) where all three arguments are mandatory.
- The string argument shows the cell reference from which we want to extract the values
- starting_at highlights the position of the string which we want to find.
- extract_length is the final argument that shows the number of characters which we want to extract from the position mentioned in the starting_at argument.
MID() Google Sheets Formula

The formula or syntax of MID function in Google sheets is =MID(string,starting_At,extract_length)
where
- string is the cell reference from which we want to extract the values
- starting_at is the place or position from the left side. Remember, we need to count the first character from the left as 1.
- extract_length are the number of characters which we want to extract from the position mentioned in the starting_at argument.
Remember, all the three arguments are mandatory in this function.
How To Use MID Function In Google Sheets?
We can use MID function in Google sheets with two methods. They are:
- Select the MID function under the Insert tab
- Manually enter the MID function
Method #1 – Select the MID Function Under the Insert Tab
Step 1: To begin with, we need to enter the cell range in the spreadsheets. Next, we need to click on the cell where we want to find the result.
Step 2: Next, click on the Insert tab and click on the Function option.
Step 3: In this list of options, we need to click on Text and choose the MID function in the options list, grouped under the Text function category.

Step 4: We will be able to see the MID function. Now, complete the formula with the arguments and press Enter key.
We will be able to see the result in the active cell in Google sheets.
Likewise, we can use MID function in Google sheets under the Insert tab.
Method #2 – Manually Enter the MID Function
Step 1: To begin with, we need to enter the cell range in the spreadsheets. Next, we need to click on the cell where we want to find the result.
Step 2: Next, enter =M in the active cell, as shown in the below image.

Step 3: In this list of options, we need to choose MID function.
Step 4: We will be able to see the MID function. Now, complete the formula with the arguments and press Enter key.
We will be able to see the result in the active cell in Google sheets.
Likewise, we can use MID function in Google sheets.
Examples
Now, let us learn how to use the MID function in Google sheets with the help of the following examples.
Example #1 – Extract The First And Last Names From The Accountant Names
For example, consider the below table showing name, first name, and last name in columns A, B, and C, respectively.

Now, let us learn how to use the MID function in Google sheets with the following steps.
The steps are:
Step 1: To begin with, we need to insert the cell range in the spreadsheet. In this example, the data is available in the cell range A1:C5. Next, we need to select the cell where we want to find the result. In this example, we need to select the cell B2.
Step 2: Next, we need to enter the MID function formula in Google sheets. Then, also insert the SEARCH function in Google sheets.
So, the complete formula is =MID(A2,1,SEARCH(” “,A2)-1)

Step 3: Press Enter key.
We will be able to see the result in cell B2, as shown in the below image.

Step 4: Now, using the AutoFill option, we can find the result in other cells in the range B3:B5, as shown in the below image.

Likewise, we can find the first name in Google sheets with the help of MID function.
Finding The Last Name
Now, let us find the last name for the given data.
Step 1: First, we need to select the cell C2 and enter the TRIM function along with the MID function formula in Google sheets. Then, also insert the SEARCH and LEN functions in Google sheets to find the last name.
So, the complete formula is =TRIM(MID(A2,SEARCH(” “,A2),LEN(A2)))

Step 2: Press Enter key.
We will be able to see the result in cell C2, as shown in the below image.

Step 3: Now, using AutoFill option, we can find the result in the cell range C3:C5, as shown in the below image.

Likewise, we will be able to find the result in Google sheets to extract the first and last names.
Example #2 – Extract The Domain Name From The Finance Website URLs
For example, consider the below table showing website URLs and domain in columns A, and B, respectively.

Now, let us learn how to use the MID function in Google sheets with the following steps.
The steps are:
Step 1: To begin with, we need to insert the cell range in the spreadsheet. In this example, the data is available in the cell range A1:B3. Next, we need to select the cell where we want to find the result. In this example, we need to select the cell B2.
Step 2: Next, we need to enter the MID function formula in Google sheets. Then, also insert the SEARCH function in Google sheets.
So, the complete formula is =MID(A2,SEARCH(“://”,A2)+3,SEARCH(“/”,A2,SEARCH(“://”,A2)+3)-SEARCH(“://”,A2)-3)

Step 3: Press Enter key.
We will be able to see the result in cell B2, as shown in the below image.

Step 4: Now, using the AutoFill option, we can find the result in cell B3, as shown in the below image.

Likewise, we can find the domain with the help of MID function.
Example #3 – Extract Last n Digits From Some Finance Numbers
For example, consider the below table showing values and result in columns A, and B, respectively.

Now, let us learn how to use the MID function with the following steps.
The steps are:
Step 1: To begin with, we need to insert the cell range in the spreadsheet. In this example, the data is available in the cell range A1:B5. Next, we need to select the cell where we want to find the result. In this example, we need to select the cell B2.
Step 2: Next, we need to enter the MID function formula in Google sheets. Then, also insert the LEN function in Google sheets.
So, the complete formula is =MID(A2,LEN(A2)-2+1,2)

Step 3: Press Enter key.
We will be able to see the result in cell B2, as shown in the below image.

Step 4: Now, using the AutoFill option, we can find the result in the cell range B3:B5, as shown in the below image.

Likewise, we can find the last n digits from some finance numbers in Google sheets with the help of MID function.
Example #4 – Use MID Function With Arrays
For example, consider the below table showing data and result in columns A, and B, respectively.

Now, let us learn how to use the MID function with the following steps.
The steps are:
Step 1: To begin with, we need to insert the cell range in the spreadsheet. In this example, the data is available in the cell range A1:B5. Next, we need to select the cell where we want to find the result. In this example, we need to select the cell B2.
Step 2: Next, we need to enter the MID function formula in Google sheets. Then, also insert the SEARCH function in Google sheets.
So, the complete formula is =MID($A$2:$A$5,1,SEARCH(” “,$A$2:$A$5))

Step 3: Press Enter key.
We will be able to see the result in cell B2, as shown in the below image.

Step 4: Now, using the AutoFill option, we can find the result in the cell range B3:B5, as shown in the below image.

Likewise, we can extract MID function with arrays with the help of MID function.
Important Things To Note
- MID function in Google sheets, in simple terms, returns the middle values from the data.
- Remember, all three arguments are mandatory in MID Google sheets function.
- We need to ensure to put the correct position in the starting_at argument and extract_length arguments to avoid errors.
Frequently Asked Questions (FAQs)
For example, consider the below table showing a cartoon show name, ‘Tom and Jerry’ in column A.
Now, let us learn how to find the mid values using the MID function in Google sheets.
To begin with, we need to insert the data and click on the cell where we want to find the result. Next, insert the MID function in Google sheets formula with arguments. So, the complete formula is =MID(A2,10,7) and press Enter key.
We will be able to see the result in cell B2, as shown in the below image.
Likewise, we will be able to use the MID function in Google sheets to find the middle values.
MID function may not work if the data provided in the argument is not correct. Also, while using other functions such as SEARCH, LEN, TRIM functions in Google sheets, we need to enter the right number of arguments with correct parenthesis to avoid errors.
MID function and MIDB functions are the same category. Both help users find the middle values but MIDB function helps users find the section of a data string based on the given character and number of bytes.
Recommeded Articles
Guide to What Is MID Function In Google Sheets. Here we learn how to use MID function in google sheets with examples and points to remember. You can learn more from the following articles. –
Leave a Reply