LEFTB

Formulas / LEFTB
Extract text from the left of a string.
=LEFTB(text, [num_chars])
  • text - required string with the characters to extract
  • num_chars - [OPTIONAL] number of characters to extract

Examples

    The LEFTB function can be used to extract a specified number of characters from the left side of a text string. For example, =LEFTB("January",3) returns "Jan", as it extracts the first three letters from the left side of the string.

    If only one argument is provided, the LEFTB function will return the first character of the text string. For example, =LEFTB("ABC") returns "A".

    The LEFTB function can also be used with numbers. If a number is provided as the text string, the LEFTB function will return a text string with the number of characters specified by the second argument. For example, =LEFTB(1000,3) returns "100" as a text string.

    The LEFTB function can be combined with other functions to return characters from the left side of the text string up to a specific character. For example, =LEFT(text,FIND(char,text)-1) returns the text to the left of the first occurrence of the char.


Summary

The LEFTB function in Sourcetable is used to extract a certain number of characters from the beginning of a string. It is useful for quickly retrieving specific information from a text.

  • The LEFT function is frequently used in combination with other functions like LEN and FIND in order to extract text in more complex formulas.

Frequently Asked Questions

What is the LEFTB function?
The LEFTB function returns the first character in a text string based on the number of bytes specified.
Does the LEFTB function work with all languages?
No, the LEFTB function may not be available in all languages.
How does LEFTB count characters?
LEFTB counts 1 byte per character if the default language is DBCS.
What is the minimum number of characters the LEFTB function can extract from a text string?
The LEFT function only extracts characters from the text string if num_chars is greater than or equal to zero.
Sourcetable Logo

Work smarter

Al is here to help. Leverage the latest models to
analyze spreadsheets, enrich data, and create reports.

Drop CSV