FINDB function
Like FIND, but returns the position in bytes: Japanese, Chinese and Korean characters count as 2 when a DBCS language is the default.
Available in All versions of Excel, including Microsoft 365, Excel for Mac and Excel for the web
In every Excel versionWorks in Google Sheets
Syntax
FINDB(find_text, within_text, [start_num])| Argument | What it means | |
|---|---|---|
find_text | Required | The text to look for. |
within_text | Required | The text or cell to search in. |
start_num | Optional | The byte position to start from. Default 1. |
Returns: The byte position of the first match (case-sensitive, no wildcards).
How FINDB works
Older East Asian computer systems stored text in a double-byte character set (DBCS): ordinary Latin letters, digits and half-width katakana use 1 byte, while kanji, hanzi, hangul, hiragana and full-width characters use 2 bytes. Fixed-width files and legacy databases from Japan, China, Taiwan and Korea are often laid out by bytes, not characters. FINDB is the byte-counting twin of FIND: it tells you the position of a match measured in bytes.
Byte counting only happens when a double-byte (DBCS) language - Japanese, Chinese (Simplified or Traditional) or Korean - is set as the default editing language under File > Options > Language. With any other default language every character counts as 1 byte and the B version behaves exactly like the normal one. So on a typical English or Greek installation FINDB and FIND return the same number.
In every other respect FINDB behaves like FIND: it is case-sensitive, does not accept wildcards and returns #VALUE! when nothing is found. Pair it with LEFTB, MIDB and RIGHTB, which also count bytes, so positions and lengths match up.
Examples
1Position of a ward in a Tokyo address (Japanese default language)
| A | B | |
|---|---|---|
| 1 | Address | |
| 2 | 東京都港区 | 9 |
Result: 9
Each of the four characters before 区 takes 2 bytes (8 bytes in total), so 区 starts at byte 9. FIND("区",A2) returns 5, its character position.
2Mixed single- and double-byte text (Japanese default language)
| A | B | |
|---|---|---|
| 1 | Code | |
| 2 | 東京ABC | 5 |
Result: 5
東京 uses 4 bytes, so the A starts at byte 5. FIND would return 3.
3Same formula with an English default language
| A | B | |
|---|---|---|
| 1 | Address | |
| 2 | 東京都港区 | 5 |
Result: 5
Without a DBCS default language every character counts as one byte, so FINDB gives the same answer as FIND.
Common errors and how to fix them
| Error | Why it happens | Fix |
|---|---|---|
#VALUE! | The text was not found, or start_num is outside the text. | Check case and spelling, or wrap in IFERROR. |
Tips
- Use FINDB only when you are working with byte-based layouts; for normal text work, FIND counts characters and is more predictable.
- If you share a workbook between a Japanese and an English PC, FINDB formulas can give different results on each machine.
Google Sheets
FINDB also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.
FINDB in other languages
In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.