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.

Error
  • Error loading Modules:
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 317 times so far.
Like this? Tweet it to your followers!

Rate this article

(0 votes)

Add comment


Security code
Refresh

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.