Excel MID Function and Its Uses

Best Online Course : SAS Programming with 50+ Case Studies

- Explain Programming Concepts in Simple English
- Live Projects & Case Studies
- Job Placement Assistance
- Get 10% off till Oct 26, 2017
- Batch starts from October 28, 2017


Excel MID Function

Explanation

The MID function extracts a portion of text, starting in the middle of text.

Syntax

The syntax for MID function is as follows:
= MID( text , starting number , number of characters to extract)

Simple Uses of MID Function

1. To extract the first five characters from name. 

Follow the steps shown in the image below.



2. To extract five characters from name, starting from the third character.

Follow the steps shown in the image below.





Practical Uses of MID Function

1. Extract First Name




Suppose a person's full name is entered in cell A2. Enter the following formula in cell B2

Logic : We need to extract characters till last character before space.

=MID (A2,1,FIND(" ",A2)-1)


1 => Start from first character

The FIND Function finds the position of a portion of text in a text.
In this case, it finds the position of a space in the name.




2. Extract Last Name



Suppose a person's full name is entered in cell A2. Enter the following formula in cell B2

Logic : We need to extract characters starting from first character after space.

=MID (A2,FIND(" ",A2)+1,25)

The FIND Function finds the position of a space in the name.

25 : I assumed maximum number of characters in a last name would be 25.


3. Convert a Text Value into Date


=DATE(LEFT(A2,4),MID(A2,5,2),RIGHT(A2,2))

The DATE Function returns the sequential serial number that represents a particular date.

DATE(year,month,day)

LEFT(A2,4) => 2013

MID(A2,5,2) => 12

RIGHT(A2,2) => 09

About Author:

Deepanshu founded ListenData with a simple objective - Make analytics easy to understand and follow. He has close to 7 years of experience in data science and predictive modeling. During his tenure, he has worked with global clients in various domains like retail and commercial banking, Telecom, HR and Automotive.


While I love having friends who agree, I only learn from those who don't.

Let's Get Connected: Email | LinkedIn

Get Free Email Updates :
*Please confirm your email address by clicking on the link sent to your Email*

Related Posts:

0 Response to "Excel MID Function and Its Uses"

Post a Comment

Next → ← Prev