The first argument,text, is thetextstring to extract from.
This is typically a reference to a cell that contains text.
The second argument, callednum_chars, specifies the number of characters to extract.
Ifnum_charsis not provided, it defaults to 1.
Ifnum_charsis greater than the number of characters available, LEFT returns theentiretext string.
When the result is TRUE, IF returns “x”.
When the result is FALSE, IF returns an empty string “”.
The result is that the codes in column B that begin with “xyz” are clearly marked.
The screen below shows how this formula can be applied in a worksheet.
you’re able to read a moredetailed explanation here.
Related functions
The LEFT function is used to extract text from theleftside of a text string.
Use theRIGHT functionto extract text starting from therightside of the text, and theMID functionto extract from themiddleof text.
For example, =RIGHT(“apple”,3) returns “ple”.
For example, =MID(“apple”,2,3) returns “ppl”.
LEN will also count characters in numbers, but number formatting is not included.
TEXTBEFORE Function
The Excel TEXTBEFORE function returns the text that occurs before a given substring or delimiter.
TEXTAFTER Function
The Excel TEXTAFTER function returns the text that occurs after a given substring or delimiter.
TEXTSPLIT can split text into rows or columns.