Syntax
=MID(text, start_num, num_chars)Arguments
| Argument | Required | Description |
|---|---|---|
text | Required | The text |
start_num | Required | Position of the first character to take, from 1 |
num_chars | Required | How many characters to take |
How to use MID
MID takes 3 required arguments. Type =MID( in a cell and SheetsBat shows the arguments as you go. Optional arguments are shown in square brackets; leave them out to use their default.
Examples
Each result below was calculated by the SheetsBat formula engine.
=MID("Fluid Flow", 1, 5)Result =MID("Fluid Flow", 7, 20)Result =MID("Fluid Flow", 20, 5)Result Related text functions
- LEFTBSame as LEFT, counting bytes; without a double byte language set as default each character counts as one byte.
- LENReturns the number of characters in a text.
- LENBSame as LEN, counting bytes; without a double byte language set as default each character counts as one byte.
- LOWERConverts text to lowercase.
- MIDBSame as MID, counting bytes; without a double byte language set as default each character counts as one byte.
- NUMBERVALUEConverts text to a number using the decimal and group separators you give, whatever the locale.
- PHONETICReturns the phonetic (furigana) text of a cell; here that is the text of the cell itself.
- PROPERCapitalizes the first letter of each word and makes the other letters lowercase.
- REGEXEXTRACTReturns the parts of a text that match a regular expression pattern.