SEARCHB in WPS Spreadsheet: Search by the Documented Byte Convention
Use SEARCHB in WPS Spreadsheet with mixed Chinese and ASCII examples, one-based byte positions, start offsets and explicit platform limits.
Verification status: See the evidence and test scope described in this guide. How formula examples are checked
Quick answer: SEARCHB locates text using the byte-oriented convention in WPS’s Windows Personal lesson. Under that documented convention, =SEARCHB("A","甲乙A甲") is expected to return 5, while character-based SEARCH returns 3. The units of the position matter.
Availability and version history
- Introduced: documented by May 30, 2019 in the official WPS lesson; original introduction is not established.
- Availability: WPS Office for Windows Personal; numeric release not identified in the lesson. The examples follow that historical product documentation.
- Scope: a current supported build range and equivalent behavior in other WPS clients remain unverified.
- Checked: October 14, 2026. Function-specific official documentation and independent example calculations; no native WPS execution was performed.
Syntax and scope of byte counting
=SEARCHB(find_text,within_text,[start_num])
find_text is the text or supported wildcard pattern to locate. within_text is the source. The optional start defaults to 1. The lesson describes case-insensitive matching and the same question-mark, asterisk and tilde-escape syntax used in its SEARCH lesson.
The published Windows Personal example treats Chinese characters and full-width punctuation as two units, with digits and half-width punctuation counted as one. The mixed ordinary ASCII examples below use one unit for each ASCII character. This is a documented DBCS-style calculation, not a measurement of a UTF-8 file’s stored byte length.
No universal rule for every language setting, emoji sequence or modern WPS client is claimed. Reproduce the mixed-script controls in the target deployment before relying on byte positions in production.
Example 1: compare byte and character positions
Enter 甲乙A甲 in A2. Its characters occupy these positions under the lesson’s convention:
| Character | Character position | Byte-oriented starting position |
|---|---|---|
| 甲 | 1 | 1 |
| ä¹™ | 2 | 3 |
| A | 3 | 5 |
| 甲 | 4 | 6 |
Now compare:
=SEARCHB("A",A2)
=SEARCH("A",A2)
Expected results: 5 and 3. Two Chinese characters contribute four byte-oriented units before the A, but only two character positions. SEARCH is the character-position alternative.
The characters here are deliberately simple and are shown explicitly. Do not substitute a different symbol and assume it has the same width under every environment’s text rules.
Example 2: begin at a later valid boundary
Using the same A2:
=SEARCHB("甲",A2)
=SEARCHB("甲",A2,3)
Expected results: 1 and 6. The later search begins at the start of the second Chinese character and therefore finds the final 甲. The answer is still an index within the complete source string.
This example starts on a valid character boundary. Behavior when the start falls inside a multi-unit character has not been established here; do not use such a boundary as an assumed portable operation.
For a character-based comparison, =SEARCH("甲",A2,2) is expected to return 4. Copying that result directly into a byte-oriented routine would change the meaning of the position.
Example 3: inspect a mixed label
For Aä¸Bæ–‡C in D2, calculate:
=SEARCHB("A",D2)
=SEARCHB("ä¸",D2)
=SEARCHB("B",D2)
=SEARCHB("æ–‡",D2)
=SEARCHB("C",D2)
Expected positions: 1, 2, 4, 5, 7. The corresponding character positions are 1, 2, 3, 4, 5. The difference accumulates as double-width characters appear before the target.
This makes a useful acceptance-test row for a migration. Record the exact input, formula, language settings and installed version alongside the actual results. A mismatch is evidence that the assumed counting context needs investigation, rather than proof that the application is measuring a file encoding incorrectly.
Wildcards and case controls
With ordinary ASCII strings:
=SEARCHB("b?x","Box-17")
=SEARCHB("~*","A*B")
=SEARCHB("a","甲乙A甲")
Expected positions: 1, 2, 5. The first demonstrates a single-character wildcard, the second searches for a literal asterisk, and the third demonstrates the lesson’s case-insensitive behavior.
These examples do not establish wildcard matching behavior across the interior of a multi-unit character. For an international pattern search, add exact language-specific acceptance cases rather than extrapolating from ASCII patterns alone.
Errors and safe composition
The dated lesson documents #VALUE! for an absent match and an invalid start. With the ASCII control ABC, =SEARCHB("Z","ABC"), =SEARCHB("A","ABC",0) and =SEARCHB("A","ABC",4) are expected failure cases. ASCII keeps the boundary interpretation unambiguous.
A returned position is useful only if the next operation expects the same unit. A character-oriented MID or LEFT call should not be handed a byte index as though it were a character index. Choose a consistently character-based workflow when no byte-based specification is required.
Keep raw source text next to the measured positions during testing. A byte-oriented count is not a security property, a storage-size estimate or a guarantee that the string is correctly encoded. It is one function’s documented indexing convention in a bounded product context.
References and verification
- Official WPS SEARCHB lesson, published May 30, 2019 (Chinese; Windows Personal).
- Editorial testing standards.
The dedicated lesson establishes the identity and historically documented behavior used here. Outputs are original examples checked independently, not screenshots or native test results. The lesson is not evidence of an exact current build range, a retirement date or support in every WPS client.