close

Login to Excel-King.com

Please use the login boxes below to log in to my webpage. You need to login in i. e. to make sure you can post to the forums.

Log in here!

About the author

Image of Philipp Kowalski

Philipp Kowalski is a self-taught Excel-lover, project manager and blog-owner. Besides developing "beautiful" solutions in MS' premier spreadsheet tool, he loves his fiance, his cats and surfing the net. He is CEO and owner of Inservo IT, the company behind Excel-King. He's also available on Twitter and YouTube. If you like this website, please leave a comment. If you want to know more visit the forums or look into the about section of this website.

In addition to Saturdays post about the LEFT and RIGHT function, I just want to give you an update on the missing stepbrother of this nice little family: The MID function.

In general the purpose of the MID function is the same as LEFT and RIGHT. It extracts a portion of a given text. The syntax of this function is:

 

=MID(text,start_num,num_chars)

... which actually stands for the text that from which a portion should be extracted (text), the starting position where the extraction should begin - always counted from the left (start_num) and the number of characters to be extracted (num_chars). In combination with the SEARCH function (see Saturdays post "LEFT RIGHT LEFT"), we will try to extract the middle initials of three members of the greatest band reunion of 2009 (sorry, Mark, you don't have middle intial  ) See the table below:

  A
1 Name
2 Deborah Anne Dyer
3 Martin Ivor Kent
4 Richart Keith Lewis

The formula we will use for this is

=MID(A2,SEARCH(" ",A2)+1,1)

The parts of this formula are explained in detail as...

=MID(A2,

The original content we want to extract from.

SEARCH(" ",A2)+1,

Search for the first occurrence of the SPACE, take its postion number and add 1 to it, because we want to start extracting one position after the SPACE.

1)

Extract one sign (the middle initial). The final table looks like:

  A B
1 Name Middle Initial
2 Deborah Anne Dyer A
3 Martin Ivor Kent I
4 Richart Keith Lewis K
Formulas in the table
Cell Formula
B2 =MID(A2,SEARCH(" ",A2)+1,1)
B3 =MID(A3,SEARCH(" ",A3)+1,1)
B4 =MID(A4,SEARCH(" ",A4)+1,1)

Display Excel tables online >> Excel Jeanie HTML 4

Small but I think useful adition to the post about LEFT and RIGHT (which can be found here). What do you think about that? Can you even guess what band I am talking about? Please feel free to comment

discuss_it2.png

Discuss this blog post in the forums (click the blue button)


Administrator
Written on Tuesday, 08 December 2009 00:00 by Administrator

Viewed 84 times so far.
Like this? Tweet it to your followers!

Rate this article

(0 votes)

Latest 'tweets' from Phil Kowalski

  • @jonstank hopefully you mean the tv series ;-) Link Monday, 08 March 2010 09:13
  • RT @happymakernowco Choose Happiness with Gratitude | Happy Maker Now http://bit.ly/cQgPki Link Sunday, 21 February 2010 05:12
  • RT @tweetmeme A Day Through the Eyes of a Blind Woman http://is.gd/7GTLq don't always take everything for granted!! Link Sunday, 21 February 2010 04:47
  • Spinning images http://is.gd/8ARak Link Wednesday, 17 February 2010 11:04
  • How does your Excel look like? http://is.gd/8vpph Link Tuesday, 16 February 2010 08:14

Add comment


Security code
Refresh

Sign up for updates

Receive the newest blog posts directly into your inbox!

Please note, that all fields are required.

First Name
Invalid Input
Family Name
Invalid Input
Email
Please enter your email address to receive our newsletter.

Please tick the check box to make sure, that you get the newsletter.

Get my VLOOKUP mini series as PDF for FREE as a little Thank You for signing up!

Sharing is caring

Facebook Twitter Digg Delicious Stumbleupon Google Bookmarks RSS Feed 

Tweet, Tweet...

Click the little blue friend to follow Phil on Twitter!

Advertisement

Create Excel dashboards quickly with Plug-N-Play reports.