EXCEL FUNCTION – MID

EXCEL FUNCTION – MID

How to use “MID” function in Excel

While working with Microsoft Excel, did you get a situation where you need to extract the characters from a string? I believe most of your answers are YES. In the said scenario “MID” function will help you to find the solution. We will be learning the Microsoft Excel “MID” in details, so stay with us and continue reading…

MID function is used for extracting the mid characters from the available string. The output of the function returns the extracted characters in new cell.

Function should give output in “General” format, however if output is not as per the desired format then we need to change the cell format to “GENERAL”.

MID Function has argument three arguments i.e. text, start_num and num_chars where we need to give the cell references and parameters. We can give the parameters as per the requirement by following the “ , “ (i.e. Comma) as separator.

If parameters are not separated by “ , “ (i.e. Comma) or quotation mark is/are missing or any other function error then it will give output as “#VALUE!” (Error). So always ensure that function parameters are used to get the appropriate results/output.

 

Advantage of MID Function

MID function is very advantageous in many ways. It helps for the document where extracting of characters from an available string is required. Extracting characters from an available string manually (one by one) to a report is very difficult and MID Function helps to apply the function in large database at once and makes the work easy, saves time and increases efficiency.

Syntax:
=MID(text,start_num,num_chars)

 

Syntax Description:

 

text argument, is used to give the cell reference from which characters should be extracted

start_num argument, is used to give the numeric value of the place of the First character to be extracted from a string

num_chars argument, is used to give the numeric value of total count of characters you want to extract started from start_num argument value

—————————————

Things to Remember:

– Spaces available in a string is counted as character

– Currency symbols (Number Formatting) are not counted as characters and will be ignored by the function

– “start_num argument” value should always be less than total length of string otherwise function output will be Blank/Empty

– “start_num argument” value should always be 1 or greater than 1 otherwise function output will return to “#VALUE!” (Error)

– “num_chars argument” should not be a negative value otherwise function output will return to “#VALUE!” (Error)

Example 1: Synchronizing a column from a database

Here, we have a column in database and requirement of extraction of “Country Name” from a complete string.

We will be following MID function as follows:

“text argument”: “A2” is the cell reference from which characters should be extract

“start_num argument”: “8” is the 8th character from string should be extracted

“num_char argument”: “9” is the total number of characters from the string should be extracted starting from 8th character

Mid function

Explanation: we can see ignored “COUNTRY” has total 7 character that is why character 8th position is mentioned in “start_num argument”. Also, total 9 characters are required after 8th that is why “9” is mentioned in “num_char argument” i.e. till 8+9 = 17 characters

Hope you learnt this Function,

Don’t forget to leave your valuable comments!

If you liked this article and want to learn more similar tricks, please Subscribe us or follow us on Social Media by clicking below buttons:

Leave a Reply

Your email address will not be published. Required fields are marked *

Are you a Data Enthusiast?

Join us for a ride on your data and automate your stuffs

Business Analytics
Data Analyst
Programming for Data Science
Predictive Analytics for Business