ExcelFlux

RIGHT function

the rightmost characters from a text value.

Text

Where can you use it?

Data preparation and reporting teams. Use this group to clean, split or reformat IDs, names and descriptions before using them in reports.

Scenario in the workbook

Extract the suffix of an invoice code. A text result preserves leading zeros.

A worked example from the workbook

RowA
6Invoice code
7INV-042
8inv-125
9AB-0007
Trial 1
=RIGHT(A7,3)

Expected result042

See the inputs and instructions for all 3 examples

Syntax

RIGHT(text, [num_chars])

Copyable formulas

English Excel · en-US
=RIGHT("INV-042",3)
Turkish Excel · tr-TR
=SAĞDAN("INV-042";3)

Expected result

“042”

Worked examples

Extract the suffix of an invoice code. A text result preserves leading zeros.

Open the English sheet. Inputs begin at A6. F7:F9 show the live results and G7:G9 show the original results for comparison.

Row A
6 Invoice code
7 INV-042
8 inv-125
9 AB-0007
Case Formula Expected result
Trial 1 =RIGHT(A7,3) 042
Trial 2 =RIGHT(A8,3) 125
Trial 3 =RIGHT(A9,4) 0007
Microsoft Excel reference