RIGHTB Function
Returns characters from the end of text, counted in bytes.
Category
Text
Available in
All versions, Microsoft 365
Returns
Text
Overview
RIGHTB is the “byte” version of RIGHT. It counts bytes instead of characters — but only when a double-byte language (Japanese, Chinese or Korean) is set as Excel's default editing language. Then each double-byte character counts as 2.
In every other setup, including English, RIGHTB gives exactly the same result as RIGHT. Unless you build workbooks for double-byte systems, use RIGHT.
Syntax
Arguments
| Argument | Required? | What it does |
|---|---|---|
| text | Yes | The text to take characters from. |
| num_bytes | Optional | How many bytes to return. Default 1. |
Examples
Example 1 — Colour code
Take the last three characters of each SKU.
| A | B | |
|---|---|---|
| 1 | SKU | Colour |
| 2 | NS-1042-BLU | BLU |
| 3 | NS-2210-RED | RED |
With English as the default language, =RIGHT(A2, 3) returns the same answers.
Common mistakes
- Results change with language settings. A workbook using RIGHTB can give different answers on a computer whose default language is Japanese, Chinese or Korean. Prefer RIGHT for workbooks you share.
Notes

Author
Kyle Stott
Certified Microsoft Excel Expert
Kyle has worked professionally with Microsoft Excel for over a decade and has consulted on and taught Excel best practices to over 400 companies across 30+ countries.