
In this article
REPLACEB is the byte-based version of REPLACE.
Advertisement
Syntax
=REPLACEB(text,1,2,"**")
| Argument | What it means |
|---|---|
text |
Text to work on |
Examples
Example 1
=REPLACEB(A2,1,2,"**")
Result: **mbai. See the worked example table below for more cases.
REPLACEB in practice
Where you will use it
- Japanese, Chinese or Korean data
- Fixed-width files measured in bytes
- Cleaning full-width characters from imported forms
Worked example
| Text | Formula | Result |
|---|---|---|
| Mumbai | =REPLACEB(A2,1,2,"**") | **mbai |
| Excel | =REPLACEB(A3,1,2,"**") | **cel |
| 12345 | =REPLACEB(A4,1,2,"**") | **345 |
Results calculated in Excel. Calculated on an English (single-byte) Excel.
Mistakes people make
| Mistake | What to do instead |
|---|---|
| Expecting different results in English | In single-byte setups the B versions match LEFT, LEN, etc. |
| Mixed-width data | Normalise with ASC first |
Related functions
📚 Part of the free Excel course: Beginner → Expert · Try it in the Formula Lab or ask the AI Helper.
Advertisement
✨ Ask AI about this article
Stuck on a step? Ask a question and the AI answers using this article.
Free · AI can be wrong