Contact

RIGHTB in WPS Spreadsheet: Extract a Suffix with Chinese Double-Byte Counts

Text Intermediate WPS Spreadsheet

Use RIGHTB for whole-character suffixes in the documented WPS Chinese/Latin context, with explicit counts and portability limits.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: under the documented Chinese double-byte convention, =RIGHTB("AB春风",4) is expected to return 春风. RIGHTB takes a suffix from the right edge of the text.

Syntax and counting direction

=RIGHTB(text,num_bytes)

text is the source string and num_bytes is the requested suffix length. These examples provide both arguments. The official WPS walkthrough extracts a seven-Chinese-character publisher name using count 14, directly illustrating the two-count convention for that text.

For AB春风, A and B occupy one count unit each, 春 occupies two, and 风 occupies two. The total is six. A suffix length of four begins at 春 and ends at 风. A suffix length of five additionally includes B.

Complete worksheet example

On a fresh worksheet, enter text AB春风 in A2. Use =RIGHTB(A2,4) in B2; its independent expected result is 春风. Use =RIGHTB(A2,5) in C2; the expected result is B春风.

Then enter text 春风AB in A3:

Formula Expected text Independent count check
=RIGHTB(A3,2) AB Two ASCII letters
=RIGHTB(A3,4) 风AB Two-count 风 plus A and B

These examples distinguish a count of four from a request for four visible characters. They also show that RIGHTB preserves the original order of the extracted suffix; it does not reverse the string.

Advanced use: retain a terminal field

Suppose a controlled label ends with a two-character Chinese category. Under the lesson’s convention, a count of four extracts that suffix even when the preceding ASCII identifier varies in length. This is useful only when the terminal field itself has a known count width.

If the category is followed by an extra space or punctuation mark, RIGHTB counts that ending too. A previously correct length can then omit part of the intended category. Inspect the actual stored string and its terminal delimiters rather than relying on how a narrow column visually displays it.

For identifiers that end in ASCII digits, extraction still returns a text fragment. Preserve that text if leading zeros carry meaning. Do not infer that a numeric-looking suffix is automatically converted into a number suitable for arithmetic.

Optional count and unsupported edges

The source describes a nonnegative count and a default of one when omitted. This guide uses explicit positive counts and complete-character boundaries. The overrun bullet refers to RIGHT rather than RIGHTB; no RIGHTB overrun rule is inferred from that name mismatch.

The lesson’s loose wording sometimes says “characters” while its Chinese example clearly counts each Chinese character twice. The worked calculations here use that demonstrated count model consistently. They do not establish fractional-count rounding, negative-input errors, half-character behavior or automatic number-to-text conversion.

Do not assume a suffix of fixed byte-count width is also fixed width in another file encoding. The operation here concerns the documented spreadsheet convention; it is not a binary file parser.

Counting scope and safe boundaries

These examples use the historical lesson’s Chinese double-byte context: the ordinary Chinese characters shown count as 2, and Latin ASCII letters and digits count as 1. This is a spreadsheet counting convention for the documented context, not a universal UTF-8 byte-length rule. No result is inferred for emoji, supplementary characters, combining marks or every language/locale configuration.

All worked cuts land on complete-character boundaries. A position or length that cuts through one of the two-count Chinese characters is outside these examples; the lesson does not establish a reliable result for that case here. Do not invent a space, replacement character or partial encoded byte as the expected output.

Use the same counting system for positions and lengths. Character positions from a different function are not automatically compatible with byte-counted positions. Confirm the actual client and input convention before applying these formulas to an imported file.

Evidence and version scope

The official WPS Academy RIGHTB lesson, published 2019-06-12, explicitly applies to WPS Office for Windows Personal. It was reviewed on October 18, 2026. The numeric build, introduction release and last supported version remain unknown. The source does not identify this function as deprecated or retired. Support in Linux, other editions and other platforms is not established by this lesson.

The worked examples are original mathematical expectations based on the official contract and formula illustration. They were not executed in WPS. Historical vendor demonstrations are documentation, not our application tests; no screenshot or runtime precision guarantee is supplied. English names and comma separators follow the lesson. Localized entry, workbook interchange and exact output formatting require verification in the intended client.

  • RIGHT: extract a suffix using character counts.
  • LEFTB: extract a prefix under the documented byte convention.
  • REPLACEB: replace a position-based segment.