LEFT

Description

LEFT returns the leftmost characters from the specified text string.

Syntax

LEFT ( text [, num_chars] )

 

Parameter

Description

text

Any text string.

num_chars

The number of characters to return. This value must be greater than or equal to zero. If num_chars is greater than the number of characters in text, the entire string is returned. Omitting this argument assumes a value of 1.

Examples

This function returns 2:

LEFT("2nd Quarter")

This function returns 2nd:

LEFT("2nd Quarter", 3)

With Latin letters one character is one byte. That is why LEFT and LEFTB are identical.

 Note:

If an Invalid formula syntax warning appears, check whether the comma is set as the list separator in your regional settings on the Windows Control Panel. If a different character is set as the list separator, use this character in the above examples in place of the comma. (Windows XP: Access the Windows Control Panel and select Regional and Language Options. On the Regional Options tab page, click Customize. On the Numbers tab page, check which character is the default list separator on your computer. Use this character in the above examples instead of the comma.

Also, see

LEFTB

MID

MIDB

RIGHT