How to Use the LEFT, LEFTBs Function in Excel

The LEFT and LEFTBs functions in Excel and Google Sheets are designed to extract a specified number of characters or bytes, respectively, from the beginning of a text string. These functions are immensely useful for separating specific sections from a cell’s content when working with text data.

Syntax:

The syntax for the LEFT function in Excel is:

=LEFT(text, [num_chars])

The syntax for the LEFT function in Google Sheets is:

=LEFT(text, num_chars)

The syntax for the LEFTBs function in Excel is:

=LEFTB(text, [num_bytes])

Examples of LEFT Function:

Below are some examples to demonstrate the use of the LEFT function:

Text Formula Result
This is a test =LEFT(A2, 4) This
1234567890 =LEFT(A3, 5) 12345

In the first example, the formula =LEFT(A2, 4) extracts the first 4 characters from the string “This is a test”, resulting in “This”.

In the second example, the formula =LEFT(A3, 5) pulls the first 5 characters from “1234567890”, giving “12345”.

Examples of LEFTBs Function:

The LEFTBs function operates similarly to the LEFT function but deals with bytes instead of characters, which is particularly important when working with languages that utilize multibyte characters.

Text Formula Result
文A字BCD =LEFTBs(A2, 3) 文A字
12文34A字 =LEFTBs(A3, 4) 12文34A

In the first example, using =LEFTBs(A2, 3) extracts the first 3 bytes of “文A字BCD”, producing “文A字”.

In the second example, the formula =LEFTBs(A3, 4) extracts the first 4 bytes from “12文34A字”, resulting in “12文34A”.

Both the LEFT and LEFTBs functions are valuable tools for text manipulation in Excel and Google Sheets, enabling precise extraction of text segments as needed.

More information: https://support.microsoft.com/en-us/office/left-leftb-functions-9203d2d2-7960-479b-84c6-1ea52b99640c

Other functions
Returns an array of text values from any specified range
Changes full-width (double-byte) English letters or katakana within a character string to half-width (single-byte) characters
Converts a number to text, using the ß (baht) currency format
Returns the character specified by the code number
Removes all nonprintable characters from text
Returns a numeric code for the first character in a text string
Combines the text from multiple ranges and/or strings, but it doesn't provide the delimiter or IgnoreEmpty arguments
Joins several text items into one text item
Changes half-width (single-byte) English letters or katakana within a character string to full-width (double-byte) characters
Converts a number to text, using the $ (dollar) currency format
Checks to see if two text values are identical
Finds one text value within another (case-sensitive)
Formats a number as text with a fixed number of decimals
Changes half-width (single-byte) characters within a string to full-width (double-byte) characters
Returns the number of characters in a text string
Converts text to lowercase
Returns a specific number of characters from a text string starting at the position you specify
Converts text to number in a locale-independent manner
Extracts the phonetic (furigana) characters from a text string
Capitalizes the first letter in each word of a text value
Replaces characters within text
Repeats text a given number of times
Returns the rightmost characters from a text value
Finds one text value within another (not case-sensitive)
Substitutes new text for old text in a text string
Converts its arguments to text
Formats a number and converts it to text
Combines the text from multiple ranges and/or strings, and includes a delimiter you specify between each text value that will be combined If the delimiter is an empty text string, this function will effectively concatenate the ranges
Removes spaces from text
Returns the Unicode character that is references by the given numeric value
Returns the number (code point) that corresponds to the first character of the text
Converts text to uppercase
Converts a text argument to a number
Returns text from any specified value