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 | ||||||||
|
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 this blog post in the forums (click the blue button)






