Practice free

RIGHTB function

RIGHTB returns characters from the end of a text string, counting in bytes rather than characters. It differs from RIGHT only in East Asian (double-byte) language settings.

Example

Practice this in the app

Syntax

RIGHTB(text, [num_bytes])

Arguments in [square brackets] are optional.

text (required)
The text to take bytes from.
num_bytes (optional)
How many bytes to return; default 1.

Returns: The last bytes' worth of characters.

What Excel actually returns

Each formula below was run in desktop Excel. The result is exactly what the cell showed, errors included.

FormulaExcel showsCase
=RIGHTB("Excel",2) el Single-byte text
=RIGHTB("日本語",2) 本語 Double-byte text

Watch out for

  • Same as RIGHT in non-double-byte settings.

Where it works

Excel
RIGHTB is in every version of Excel from 2007 on. Differs from the non-B version only in East Asian (double-byte) language settings.
Google Sheets
No direct equivalent. Use RIGHT.

Part of Text functions. Every result on this page was measured in desktop Excel, build 16.0.20527. Last updated .