Returns the right portion of a string up to a certain number of bytes. Learn more.
In Google Sheets, the function "RIGHTB" is used to extract a specified number of bytes from the rightmost part of a text string.
It is similar to the "RIGHT" function, but instead of working with characters,it operates on the byte level.
The syntax for the RIGHTB function is as follows:
RIGHTB(text, numofbytes)
"text" is the text string from which you want to extract the bytes.
"numofbytes" specifies the number of bytes you want to extract from the right side of the text string.
Here's an example usage of the RIGHTB function:
=RIGHTB("Hello, 世界!", 6)
In this example, the RIGHTB function will extract the last 6 bytes from the text string "Hello, 世界!", which includes the exclamation mark and the last two characters of the Chinese characters.
The result will be "界!".
Note that the RIGHTB function is useful when dealing with multibyte character encodings such as UTF-8, where characters may require more than one byte of storage.