The MIDB function returns a section of a string starting at a given character and up to a specified number of bytes.
Parts of a MIDB function
MIDB(string, starting_at, extract_length_bytes)
Part | Description |
---|---|
string | The string from which to extract a section. |
starting_at | The position in the input string to start extracting from. |
extract_length_bytes | The number of bytes the extracted string should have. |
Notes
MIDB
returns the same value asMID
if the input string has only single byte charactersStarting_at
must be greater than or equal to 1.Extract_length_bytes
must be greater than or equal to 0.
Examples
A | B | C |
---|---|---|
1 | Input | Formula |
2 | Aeñds | =MIDB(A2, 2, 2) |
3 | Aeñds | =MID(A3, 2, 2) |
4 | 熊本=熊本 | =MIDB(A4,2,4) |
5 | 熊本=熊本 | =MID(A5,2,4) |