The RIGHTB function returns the last characters in a text string based on the number of bytes you specified. When a double-byte character set (DBCS, e.g., Japanese, Simplified Chinese, Traditional Chinese, and Korean) is set as the default language, each character will be counted as 2 bytes. Otherwise, the RIGHTB function is the same as RIGHT function.
- Text is required, the text string that contains the text you need to extract;
- Number_bytes is optional, the number of characters you need to extract from the right.
Num_bytes _bytes needs to be greater than or equal to 0;
- If num_bytes is omitted, the result returns to the last character;
- If num_bytes has decimals, only integer portion will be extracted;
- If num_bytes is negative, the result returns #VALUE!
Example: Extract the last character from the text string in cell A2.
The result returns "n", the last character in the sentence.