LEFT |
LEFT(text [,num_chars]) |
Returns the first or left most characters in a text string. |
text | The text string that contains the characters you want to extract. |
num_chars | (Optional) The number of characters you want to extract. |
REMARKS |
* If "text" is a text string then it must be enclosed in speech marks. * The "text" can be numbers. * The "text" can be a cell reference. * If "num_chars" < 0, then #VALUE! is returned. * If "num_chars" > the length of the "text", then "text" is returned. * If "num_chars" is left blank, then 1 is used. * Any blank spaces are counted as individual characters. * If more than one cell is referenced then a Dynamic Array Formula will be applied. * You can use the RIGHT function to return the last or right most characters in a text string. * You can use the TEXTBEFORE function to return the characters from the start of a text string before a delimiter. * You can use the TEXTSPLIT function to return the text string split into multiple columns using delimiters. * You can use the TRIM function to return a text string with all spaces removed from the beginning, middle and end. * You can use the LEFTB function if you have languages that use the double-byte character set. * The equivalent VBA function is VBA.LEFT * For the Microsoft documentation refer to support.microsoft.com * For the Google documentation refer to support.google.com |
|
1 - What are the 6 characters on the left of this text string. 2 - What is the first character of this text string. 3 - When the number of characters is 0 an empty string (or blank cell) is returned. 4 - What is the first character of this text string. 5 - What are the 7 characters on the left of this text string. 6 - What are the 100 characters on the left of this text string. 7 - What are the 5 characters on the left of this text string. Blank spaces are counted. 8 - What are the 5 characters on the left of this text string after all spaces have been removed. 9 - What are the first 2 digits of this number. 10 - What are the 4 characters on the left of the text in cell "B1". 11 - What are the 4 characters on the left of the text in cells "B1:B3". This is an example of a Dynamic Array Formula. 12 - When a text string, number or cell reference is not passed in. 13 - When the number of characters is less than 0. 14 - When the number of characters is not a number. |
© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited Top