Returns the left portion of a string up to a certain number of bytes. Learn more.
In Google Sheets, the function LEFTB(string, numofbytes) is not a built-in function.
It seems you may be confusing it with a similar function in Microsoft Excel.
In Microsoft Excel, the LEFTB function is used to extract a specified number of bytes from the beginning of a text string, where each character may be multiple bytes.
This function is primarily used for working with double-byte character set (DBCS) languages like Chinese, Japanese, or Korean, where characters can occupy more than one byte of storage.
However, in Google Sheets, there is no direct equivalent to the LEFTB function. Instead, you can use a combination of other functions to achieve a similar result. Here's an example:
Assuming your text string is in cell A1, you can use the following formula to extract a specified number of bytes:
=LEFT(A1, numofbytes)
This formula works because Google Sheets treats each character as one byte by default, so using the LEFT function alone achieves the same result as LEFTB in Excel.
Please note that the LEFTB function does not exist natively in Google Sheets, so you need to use the LEFT function as a workaround.