MID

MID(text, start_num, num_chars)

Returns the characters from the middle of a text 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 more than one cell is referenced then a Dynamic Array Formula will be applied.
* If "start_num" = 0, then #VALUE! is returned.
* If "start_num" < 0, then #VALUE! is returned.
* If "num_chars" = 0, then a blank string is returned.
* If "num_chars" > the length of "text", then a blank string 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 TEXTAFTER function to return the characters from the end of a text string after a delimiter.
* You can use the TEXTBEFORE function to return the characters from the start of a text string before a delimiter.
* You can use the TEXTSPLIT function to return the text string split into multiple columns using delimiters.
* You can use the MIDB function if you have languages that use the double-byte character set.
* The equivalent VBA function is VBA.MID
* For the Microsoft documentation refer to support.microsoft.com
* For the Google documentation refer to support.google.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",1,0) = blank cell
6=MID("Better Solutions",1,6) = Better
7=MID("Better Solutions",8,200) = Solutions
8=MID("Better Solutions",100,10) = blank string
9=MID("this is some text",0,0) = #VALUE!
10=MID("this is some text",0,1) = #VALUE!
11=MID("some more text",-3,2) = #VALUE!


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