Related Functions:

The LEFT function returns a specified number of characters from the start of a supplied text string. LEFTB returns the first character or characters in a text string, based on the number of bytes you specify.

Syntax

=LEFT(text,[num_chars])

=LEFTB(text,[num_bytes])

Note: FINDB counts 2 bytes per character only when a double-byte character set (DBCS) language is set as the default language. Otherwise LEFTB behaves the same as LEFT, counting 1 byte per character.

Arguments

Argument Description
text The original text string
[num_chars] Optional. Argument that specifies the number of characters LEFT is to be extract
[num_bytes] Optional. Argument that specifies the number of characters LEFTB is to be extract, based on bytes

Note: The LEFT and LEFTB functions always returns a text string, even though this may be contain digits and may look like a number. This may be important if you wish to use the result of the function within further functions or formulas.

Examples

  A B C D
1 Text Formula Result Notes
2 New York City =LEFT(A2) N num_chars argument defaults to 1 when omitted
3   =LEFT(A2,3) New  
4   =LEFT(A2,8) New York  
5 84111-0001 =LEFT(A5,5) 84111 Standard 5 digit zip code
6 303-512-7432 =LEFT(A6,3) 303 Area code of a phone number

Note: the examples in cell B5 and B6 return the text values “84111” and “303” even though the original string contains a number, this is stored as a text string in Excel.