MID(text, start_num, num_chars)

Returns the text string which is a substring of a given string.

textThe text string containing the characters you want to extract.
start_numThe position of the first character you want to extract in text.
num_charsThe number of characters you want to return.

Remarks

* The first character in "text" has a "start_num" of 1, and so on.
* If "num_chars" > the length of "text", then a blank string is returned
* If "num_chars" < 0, then #VALUE! is returned.
* If "num_chars" = 0, then #VALUE! is returned.
* You can use the FIND function to return the position of a substring within a larger text string. This is case sensitive.
* You can use the SEARCH function to return the position of a substring within a larger text string. This is not case sensitive.
* You can use the MIDB function if you have languages that use the double-byte character set.
* For the Microsoft documentation refer to support.office.com

 A
1=MID("this is some text",9,4) = some
2=MID("this is some text",1,1) = t
3=MID("this is some text",2,1) = h
4=MID("this is some text",1,2) = th
5=MID("this is some text",0,1) = #VALUE!
6=MID("Better Solutions",1,6) = Better
7=MID("Better Solutions",8,200) = Solutions
8=MID("Better Solutions",100,10) = blank string
9=MID("some more text",-3,2) = #VALUE!


© 2019 Better Solutions Limited. All Rights Reserved. © 2019 Better Solutions Limited Top