LEFT
Name
Left
Description
Returns the first (or leftmost) characters from a text value.
Syntax
LEFT(MyText, Num_chars)
Remarks
Arguments are as follows:
Argument | Description |
---|---|
MyText | Text string that contains the characters you want to extract. |
Num_chars | (Optional) Specifies how many characters you want to extract. |
The MyText argument can be a string, a formula that returns a string, or a reference to a cell containing a string.
Note the following about the Num_chars argument:
- Num_chars must be greater than or equal to zero.
- If Num_chars is greater than the length of text, LEFT returns all text.
- If Num_chars is omitted, "1" is assumed.
See also CHAR, LOWER, MID, PROPER, RIGHT, and UPPER.
Data Type
Accepts string data for the MyText argument and numeric data for the Num_chars argument. Returns string data. For more information, see Data Type for Each Cell Type.
Example
LEFT(A2,LEN(A2)–1)
fpSpread1.Formula = "LEFT(""TotalPrice"")" equals "T"
fpSpread1.Formula = "LEFT(""Total Price"", 5)" equals "Total"