LEFTformula is used to extract a specific number of characters from the beginning of a text string. It is most commonly used to extract the first name or last name from a full name or to extract a date from a text string.
- How to use
- Examples of using
LEFTformula not working?
- Similar formulas to
LEFT formula with the syntax shown below, it has 1 required parameter and 1 optional parameter:
- string (required):
The text string that you want to extract characters from.
- number_of_characters (optional):
The number of characters that you want to extract from the beginning of the string. If this parameter is omitted, the formula will extract one character by default.
ExamplesHere are a few example use cases that explain how to use the
LEFTformula in Google Sheets.
Extracting First Names
If you have a column of full names and you want to extract just the first name, you can use the
LEFT formula to extract the first word, up to the first space character.
If you have a column of text strings that include dates in a consistent format, you can use the
LEFT formula to extract just the date portion of the string.
Extracting Postal Codes
If you have a column of addresses that include postal codes at the end of the string, you can use the
LEFT formula to extract just the postal code portion of the string.
LEFTnot working? Here are some common mistakes people make when using the
LEFTGoogle Sheets Formula:
Missing second argument
Forgetting to include the second argument, the number of characters to extract, will result in an error.
Number of characters exceeds length of string
If the number of characters to extract is greater than the length of the string, the entire string will be returned.
The following functions are similar to
LEFT or are often used with it in a formula:
The MID formula in Google Sheets is used to extract a specific number of characters from a string, starting at a specified point. This is useful when working with large datasets and you only need a portion of the information in a cell. The formula takes in the string to extract from, the starting point, and the length of characters to extract as arguments.
RIGHTformula in Google Sheets returns the rightmost characters from a string, based on the number of characters specified. It is commonly used to extract a certain number of characters from the end of a string. The formula takes two arguments: the string from which to extract the characters, and the number of characters to extract.
FINDformula in Google Sheets searches for a specific text within another text and returns the position of the first occurrence of the text. This formula is often used to extract a substring from a larger string or to check if a certain text exists within another text.
LENformula in Google Sheets is used to count the number of characters in a given text string. It is commonly used to check the length of text inputs, or to find the length of a cell value or range.
You can learn more about the
LEFT Google Sheets function on Google Support.