Excel LEFT function


The Excel LEFT function extracts a given number of characters from the left side of a provided text string.
					=LEFT(text, [num_chars])
  • text: The text string from which to extract characters
  • num_chars: [Optional] The number of characters to extract, starting from the left. If omitted, defaults to 1
Return value
A substring containing the specified number of characters from the left side of the text.

How to use

LEFT is commonly used in text manipulation for extracting specific portions of strings, such as prefixes, codes, or certain numbers of characters from the beginning of the text.


Simple LEFT
Extracting Initial Characters from Text: To extract the first three characters of a string:
					=LEFT(A1, 3)
If A1 contains “Excel”, this formula returns “Exc”.
LEFT with Cell References
Using LEFT with Cell References: Extracting a fixed number of characters from different cells:
					=LEFT(B2, 4)
If B2 contains “2024-01-01”, the formula returns “2024”.
LEFT for Code Extraction
Extracting Codes or Identifiers: Pulling out a specific code from a standardized text format:
					=LEFT(C2, 5)
For an entry like “ABCD1234”, it returns “ABCD1”.
LEFT with LEN for Truncation
Truncating Text to a Specific Length: Using LEFT with LEN to truncate text:
					=LEFT(D2, LEN(D2) - 3)
Shortens the text in D2 by removing the last 3 characters.
LEFT in Data Cleaning
Cleaning Data by Removing Unwanted Prefixes: Removing specific prefixes from text entries:
					=LEFT(E2, LEN(E2) - LEN("Prefix-"))
Assuming “Prefix-” is a common prefix in E2, this removes it.

Additional Notes

  • LEFT is particularly useful in parsing strings when the desired text is at the beginning.
  • For extracting characters from the end of a string, use the RIGHT function.
  • Often used in combination with other text functions like LEN, FIND, and MID for advanced text manipulation.

Related Functions

Excel RIGHT function

The Excel RIGHT function extracts characters from the end of a text string, ideal for isolating specific data segments.

Excel MID function

The Excel MID function extracts a substring from the middle of a text string, based on start position and length, perfect for text manipulation.

Excel LEN function

The Excel LEN function returns the length of a text string in characters, aiding in text data analysis and validation.

Content Navigation