LEFT, RIGHT

Function Reference: LEFT, RIGHT

Syntax
=LEFT(text,[num_chars])
=RIGHT(text,[num_chars])
Purpose / Description
Returns a text string containing one or more characters from the beginning (LEFT)or ending (RIGHT) of a text string.
Arguments
Name Type Description
text text string A constant, reference or nested expression which provides the text string from which characters are to be extracted.
[num_chars] number An optional constant, reference or nested expression which specifies how many characters are to be returned from the text string.  Defaults to 1 if omitted.  If the number contains a decimal portion, it is ignored.
Return Values
Type Specific Value Description
text string   A text string containing the specified number of characters from the beginning (LEFT) or ending (RIGHT) of the text string passed to text.
error #VALUE! If num_chars is not a number and cannot be coerced to a number.
If num_chars is a number < 0.
error   Any errors referenced by arguments are returned due to propagation of error values.
Notes / Comments / Advice / Warnings
Note: If text is a blank cell, an empty string, or num_chars is 0, the text string returned is an empty string ("").
Note: If the value of num_chars exceeds the count of characters in text, then the entire text string is returned, but will be only as long as the original text string.
Examples: Open / download sample workbook: LEFT, RIGHT, MID.xlsx