The LEFTB function returns the left portion of a string up to a certain number of bytes.
Parts of a LEFTB function
LEFTB(string, num_of_bytes)
| Part | Description |
string
|
The string from which the left portion will be returned. |
num_of_bytes
|
(Optional) The number of bytes to return from the left side of `string`. |
Notes
-
LEFTBreturns the same value asLEFTif the input string has only single byte characters -
num_of_bytesmust be greater than or equal to zero. - If
num_of_bytesis greater than the length of text in bytes,LEFTBreturns all of text. - If
num_of_bytesis omitted, it is assumed to be 1.
Examples
| A | B | C | |
|---|---|---|---|
|
1
|
Input | Formula | Output |
|
2
|
Aeñ | =LEFTB(A2, 2)
|
Ae |
|
3
|
Aeñ | =LEFT(A3,2)
|
Ae |
|
4
|
熊本
|
=LEFTB(A4, 2)
|
熊 |
|
5
|
熊本
|
=LEFT(A5,2)
|
熊本 |

