Returns the leftmost characters from a text string.
Sample Usage
LEFT("Hello World!", 3)
Syntax
LEFT(
-
text
-
[
num_chars]
-
text—The text that you want to return a portion from.
-
num_chars—[optional]Starting from the leftmost character, the number of characters to return. If a number isn’t provided, only the first character is returned.
Usage Notes
- With right-to-left languages, LEFT will return the rightmost characters instead.
Examples
This example references the following sheet information:
Item Number | Transaction Total | Units Sold | Ship Date | |
---|---|---|---|---|
1 | C001 | 1,170.00 | 78 | 02/15/19 |
2 | C002 | 1,491.00 | 42 | 03/20/19 |
3 | C003 | 812.00 | 217 | 02/27/19 |
Given the table above, here are some examples of using LEFT in a sheet:
Formula | Description | Result |
---|---|---|
=LEFT("Smartsheet", 5) | Returns the 5 leftmost characters from the text string “Smartsheet”. | Smart |
=LEFT([Item Number]2, 3) | Return the 3 leftmost characters from a text string in the “Item Number” column on row 2. | C00 |
=SUMIF([Item Number]:[Item Number], LEFT(@cell, 3) = "C00", [Transaction Total]:[Transaction Total]) |
Sums the values in the “Transaction Total” column for rows where the value in the “Item Number” column returns the 3 leftmost characters equal to “C00”. Rows 1, 2 and 3 apply. | 3,473.00 |