INTRODUCTION
MID function comes under the TEXT category in Excel.
MID FUNCTION is used when we need to extract letters at some specific position in a given text string.
MID FUNCTION returns a specific number of characters from a text string,starting at the position you specify, based on the number of characters you specify.
PURPOSE OF MID FUNCTION IN EXCEL
MID FUNCTION returns the specified number of characters from a string, counted from the Left.
PREREQUISITES TO LEARN MID FUNCTION
THERE ARE A FEW PREREQUISITES WHICH WILL ENABLE YOU TO UNDERSTAND THIS FUNCTION IN A BETTER WAY.
- Basic understanding of how to use a formula or function.
- Basic understanding of rows and columns in Excel.
- Some information about the financial terms is an advantage for the use of such formulas.
- Of course, Excel software.
Helpful links for the prerequisites mentioned above
What Excel does? How to use formula in Excel?
SYNTAX: MID FUNCTION
The Syntax for the function is
=MID(STRING, STARTING NUMBER, NUMBER OF CHARACTERS)
STRING Text from which the characters are to be extracted
STARTING NUMBER Starting point(CHAR NUMBER) ,from where the extraction needs to be started counted from the left.
NUMBER OF CHARACTERS The number of characters to be extracted. (COUNTED FROM THE STARTING NUMBER).
EXAMPLE:MID FUNCTION IN EXCEL
DATA SAMPLE
Let us try to extract the 10 letters from starting from letter no. 3 from the text
“A little brown bear”.
STEPS TO USE MID FUNCTION
The string has been put in cell C4.The string is ” A little brown bear”.
We put the function in D4 as
=Mid(C4,3,10)
The function extracts 10 letters starting from letter no. 3 from the string contained in C4.
*SPACES ARE ALSO COUNTED AS CHARACTERS
KNOWLEDGE BYTES
USE OF MID FUNCTION
MID FUNCTION is very useful if we have a lot of data having the same and fixed format.
As we discussed in LEFT AND RIGHT functions, let us take the date example.Suppose the dates are
01.02.2020
02.02.2020
10.02.2020
Let us extract the month part from the above mentioned data.
The above example shows how we separated the month part of a date.
This can be achieved by setting the format type of the cell but if the scenario is very random, this method is quite helpful.
The MID function starts picking up the characters from character no. 4 and picks up 2 characters as shown in the function.
=MID(C15,4,2)