ExcelFlux

REPLACEB function

Replaces characters within text.

Text · Guided Excel example

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

Replace two bytes starting at the second byte of an ASCII identifier.

A worked example from the workbook

RowA
6Code
7ABC-X
8AB-42
9SKU-X
Record 1
=REPLACEB(A7,2,2,"ZZ")

Illustrative outputAZZ-X

See the inputs and instructions for all 3 examples

Worked examples

Replace two bytes starting at the second byte of an ASCII identifier.

Column F provides expressions as text. Satisfy the stated requirements, then paste into an empty Excel cell and compare with column G. The result was not verified in desktop Excel here.

Row A
6 Code
7 ABC-X
8 AB-42
9 SKU-X
Trial Expression Sample output
Record 1 =REPLACEB(A7,2,2,"ZZ") AZZ-X
Record 2 =REPLACEB(A8,2,2,"ZZ") AZZ42
Record 3 =REPLACEB(A9,2,2,"ZZ") SZZ-X
Microsoft Excel reference