Back to articles
Formulas
2026-04-1510 min read

Replace Multiple Text Strings in Excel from a List

Functions in this article

Jump to the reference pages for the Excel functions used below.

Browse library
Table of Contents

You have a column of text and a list of changes to make: expand abbreviations, remove a label, and keep the original values for comparison. In Excel for Microsoft 365, you can combine REDUCE with SUBSTITUTE to apply each Find/Replace pair in turn and return the cleaned text in another column.

The order matters. Each rule works on the result of the previous rule, and matches are case-sensitive substrings. A replacement can therefore become something a later rule replaces again. We'll make that behavior visible before you use the formula on a longer list.

This walkthrough targets Microsoft 365 desktop. Microsoft's REDUCE documentation lists Microsoft 365 on Windows and Mac and Excel for the web, but does not list Excel 2024. The exact formula and 22 controls below were checked in Excel for Mac 16.114, build 16.114.26101123, including saving, closing, and reopening the test workbook. That is evidence for this Mac build; Windows, web, mobile, and other versions were not tested here.

Set up the source and replacement list

You can download the replacement-list example workbook to follow along, or build the example below in your own workbook.

Create a sheet named Rules. Enter Source in A1 and Result in B1. In A2, enter:

12 st. / 8 rd. [draft]
Text

Enter Find in E1 and Replace in F1. Set up the six rule rows as follows. Where the table says leave empty, leave the cell genuinely empty; don't type those words or a space.

RowE: FindF: Replace
2st.Street
3rd.Road
4AveAvenue
5leave emptyIGNORED
6[draft]leave empty
7ZZZZ

The empty Find cell in E5 tells the formula to skip that row. The empty Replace cell in F6 has a different job: it tells the formula to delete [draft]. We'll keep both rows in the example so you can see the distinction.

Enter the formula in B2

=REDUCE(A2,ROW($E$2:$E$7)-ROW($E$2)+1,LAMBDA(current,rule,IF(INDEX($E$2:$E$7,rule)="",current,SUBSTITUTE(current,INDEX($E$2:$E$7,rule),INDEX($F$2:$F$7,rule)&""))))
Formula

B2 returns the following text, shown in quotation marks so the final space is visible. The quotation marks aren't part of the result.

"12 Street / 8 Road "
Example

A2 stays unchanged. Both abbreviations have expanded, and [draft] has gone. One trailing space remains because the space before [draft] was not part of the Find text. This formula doesn't trim the result. If you also need to remove unwanted spaces, treat that as a separate cleanup decision; the TRIM walkthrough explains what that changes.

REDUCE formula selected in B2 beside the original address in A2 and six Find and Replace rows in E2:F7.
B2 expands the abbreviations and removes [draft], while A2 keeps the original text.

Copy B2 down beside your other source values. A2 changes to A3, A4, and so on, while the dollar signs keep E2:F7 fixed. Each source value goes through the same six rules.

Follow one rule through the formula

REDUCE starts with the text in A2 and carries the current result from one rule to the next. It returns one final value in B2. The LAMBDA calculation defines what happens at each step with two input names:

  • current holds the text as it stands before this rule runs.
  • rule holds the position of the rule to apply, from 1 through 6.

The expression ROW($E$2:$E$7)-ROW($E$2)+1 supplies those six positions. The ROW function provides worksheet row numbers 2 through 7; subtracting 2 and adding 1 turns them into positions 1 through 6. Microsoft's ROW documentation describes returning row numbers as an array.

At position 1, INDEX($E$2:$E$7,rule) reads E2, which contains st.. INDEX($F$2:$F$7,rule) reads F2, which contains Street. The INDEX function picks both values from the same position, so the pair stays together. Microsoft's INDEX documentation explains this selection by row position.

The IF test checks whether the Find value equals "". If it does, the formula returns current unchanged for this step. Otherwise, SUBSTITUTE replaces the Find text with the corresponding Replace text.

Here's what that means for A2:

  1. Replace st. with Street.
  2. Replace rd. with Road in the updated text.
  3. Look for Ave; there isn't a match, so keep the text.
  4. Skip the empty Find cell, regardless of IGNORED beside it.
  5. Delete [draft], leaving the space before it.
  6. Look for ZZ; there isn't a match, so keep the text.

There is no lookup for a matching key in the rule list. Reading by position lets you keep duplicate Find strings and differently capitalized Find strings as separate rules.

Here REDUCE calls the LAMBDA for you. If you'd like to learn how to name and call a calculation yourself, the custom LAMBDA function walkthrough covers that separate task.

Distinguish an empty Find from an empty Replace

A cell can look empty because it contains nothing or because a formula returns empty text, such as ="". Those are different cell states, but this formula deliberately treats both as empty for these two decisions:

Find cellReplace cellWhat happens
Truly emptyAny valueSkip this rule
Formula =""Any valueSkip this rule
Nonempty textTruly emptyDelete matching text
Nonempty textFormula =""Delete matching text
Nonempty textText 0Replace matching text with the character 0

The &"" after the replacement's INDEX expression makes the replacement textual. It keeps an empty replacement reference from becoming the digit zero. A replacement containing text 0 still gives you 0; zero and empty text aren't interchangeable.

A Find cell containing a space is also not empty. It defines a rule for that space character. If a row seems to be changing text unexpectedly, check for spaces in E before changing the formula.

These controls use the same B2 formula on separate copies of the sheet. Keep only the listed rules in E2:F7 and leave the remaining rule cells truly empty. In this table, formula-empty means entering ="" in the cell.

Source in A2Rules, from top to bottomExpected result
alphaTruly empty Find → BADalpha
alphaFormula-empty Find → BADalpha
a[draft]b[draft] → truly empty Replaceab
a[draft]b[draft] → formula-empty Replaceab
XX → text 0Text 0
alphaAll Find cells truly emptyalpha
a ba → x; empty Find → BAD; b → yx y
Formula =""st. → StreetEmpty text

The last control uses a source formula that returns empty text. It is not a test of a genuinely empty source cell.

Check case, repeated text, and partial matches

This formula omits SUBSTITUTE's optional occurrence number, so each rule replaces every occurrence of its Find text. Microsoft's SUBSTITUTE documentation explains this all-occurrences behavior.

The following controls also show why you should check a few representative values before copying the formula through your data:

Source in A2Rules, from top to bottomExpected result
14 Lanest. → Street14 Lane
st. st.st. → StreetStreet Street
st. ST. St.st. → StreetStreet ST. St.
cat scatter CATcat → dogdog sdogter CAT
a Aa → x; A → yx y
a? *? → Q; * → SaQ S

Look closely at scatter. The lowercase text cat appears inside it, so the replacement changes that part too. Uppercase CAT stays as it was. This is literal, case-sensitive substring replacement, with no whole-word check.

The question mark and asterisk are literal characters here. They don't stand for wildcard patterns, and the formula doesn't interpret regular expressions.

Put overlapping and chained rules in the right order

Suppose one rule changes A to B, and the next changes B to C. Starting with A, the final result is C: the second rule sees the first rule's output.

Reverse those rules and the final result is B. The first rule finds no B; the second creates it after that opportunity has passed. All substitutions are sequential, not simultaneous.

Forward and reverse replacement examples show source A returning C with A-to-B then B-to-C rules, and B with the rules reversed.
A → B followed by B → C returns C; reversing the two rules returns B.
Source in A2Rules, from top to bottomExpected result
AA → B; B → CC
AB → C; A → BB
AB ABAB → X; A → YX X
AB ABA → Y; AB → XYB YB
AA → B; A → CB
AA → AA onceAA
AA → AA in two separate rule rowsAAAA

For overlapping text such as A and AB, putting the longer Find string first can preserve the match you intend. It isn't a universal sorting rule: choose the order according to the result you need.

Duplicate Find values aren't removed. In the A → B, then A → C example, the second rule still runs; it just has no A left to replace. In the two A → AA rows, the second rule does find more matches and doubles the text again. One rule doesn't keep applying itself indefinitely.

Extend the list and check the result

The formula's rule list ends at row 7. Entering another pair below it won't automatically include that rule. Extend all three occurrences of $E$2:$E$7 and the replacement range $F$2:$F$7 to the same final row. Keep ROW($E$2) as the fixed first-cell anchor.

When a result surprises you, work through these checks:

  • Confirm that the source is in column A and the result formula is in column B.
  • Check the exact letter case and any spaces in Find and Replace.
  • Read the rules from top to bottom, considering what each earlier replacement produces.
  • Check that both rule columns have the same start and end rows in the formula.

The formula doesn't hide Excel errors behind a blank result. If an input or rule contains an error, investigate it; the Excel formula error guide can help you identify the cause.

For a small, one-time change directly in selected cells, Find & Replace may be enough. For an import you refresh repeatedly, consider keeping the cleanup in Power Query. This worksheet approach fits a short, editable rule list when you want the original text and calculated result side by side. Keep those two columns together while you review the changes, especially where a Find string can occur inside a longer word.

Enjoyed this guide?

Join our newsletter to get the latest Excel tips delivered to your inbox.

You can unsubscribe anytime. See our Privacy Policy.