LEFT

Using the Excel LEFT Function

Summary

The Excel LEFT function returns the first character(s) in a text string, based on the number of characters specified by the user. The LEFTB function can also be used, which returns the first character(s) in a text sting based on the number of bytes specified by the user.

When using LEFTB with a DBCS language, such as Japanese, Chinese (Simplified and Traditional), or Korean, the function will count 2 bytes per character. If LEFTB isn't used with a DBCS language, it acts the same as LEFT and counts 1 byte per character.


Syntax

=LEFT (text, [num_chars])

=LEFTB (text, [num_bytes])


Syntax Breakdown

Text
Required for both LEFT and LEFTB. The text string that contains the characters you wish to extract.

Num Chars
Optional. The number of characters you want the function to extract. If specified, num_chars must be greater than or equal to zero. If omitted, it is assumed to be 1. If the argument is greater than the length of text, the entire text is returned.

Num Bytes
Optional. The number of characters, based on bytes, the function will return.


Usage Notes

The LEFT and LEFTB functions extract a user specified number of characters from the left of a text string.

The function does not recognize number formatting (i.e. symbols such as $). Such symbols will not be extracted or counted.