Log in  \/ 
x
or
x
x
Register  \/ 
x

or

Find and replace multiple values in Excel

Normally, the Find and Replace feature can help you to find a specific text and replace it with another one, but, sometimes, you may need to find and replace multiple values simultaneously. For example, to replace all “Excel” text to “Excel 2019”, “Outlook” to “Outlook2019” and so on as below screenshot shown. This article, I will introduce a formula for solving this task in Excel.


Find and replace multiple values in Excel

To deal with this job, you should nest multiple SUBSTITUTE functions together, and insert the find and replace pairs using the INDEX function. The generic syntax is:

=SUBSTITUTE(SUBSTITUTE(cell,INDEX(find,1),INDEX(replace,1)),INDEX(find,2),INDEX(replace,2))
  • cell: The cell contains the text that you want to replace with other text.
  • find: The original text that you want to find and replace.
  • replace: The new text that you want to replace with.

1. Please copy and paste the following formula into a blank cell where you want to put the result:

=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2,INDEX($D$2:$D$5,1),INDEX($E$2:$E$5,1)),INDEX($D$2:$D$5,2),INDEX($E$2:$E$5,2)),INDEX($D$2:$D$5,3),INDEX($E$2:$E$5,3)),INDEX($D$2:$D$5,4),INDEX($E$2:$E$5,4))

2. Then drag the fill handle down to the cells that you want to apply this formula, and the specific texts have been replaced with the new ones at once, see screenshot:


Explanation of the formula:

The basic pattern of the above formula is the usage of the SUBSTITUTE function:

=SUBSTITUTE (text, old_text, new_text, [instance])

Then embed the INDEX function into the SUBSTITUTE function, the INDEX function is used to retrieve both the "find" text and the "replace" text, this will run the first pair of the find and replace:

=SUBSTITUTE(text,INDEX(find,1),INDEX(replace,1))

If there are multiple pairs of the find and replace, please nest the SUBSTITUTE functions together, for making the formula read and write easier to add or remove other substitutions, you can write the formula as below screenshot shown:


Note: In the above formula, A2 is the cell contains the text that you want to replace, D2:D5 is the range of cells contains the original text that you want to find and replace, E2:E5 is the new text that you want to replace with. And 1, 2, 3, 4 is the number of the pair of find and replace. Please change them to your need.


Relative functions used:

  • SUBSTITUTE:
  • The SUBSTITUTE function replaces text or characters within a text string with another text or characters.
  • INDEX:
  • The INDEX function returns the displayed value based on a given position from a range or an array.

The Best Office Productivity Tools

Kutools for Excel - Helps You To Stand Out From Crowd

Would you like to complete your daily work quickly and perfectly? Kutools for Excel brings 300 powerful advanced features (Combine workbooks, sum by color, split cell contents, convert date, and so on...) and save 80% time for you.

  • Designed for 1500 work scenarios, helps you solve 80% Excel problems.
  • Reduce thousands of keyboard and mouse clicks every day, relieve your tired eyes and hands.
  • Become an Excel expert in 3 minutes. No longer need to remember any painful formulas and VBA codes.
  • 30-day unlimited free trial. 60-day money back guarantee. Free upgrade and support for 2 years.
Ribbon of Excel (with Kutools for Excel installed)

Office Tab - Enable Tabbed Reading and Editing in Microsoft Office (include Excel)

  • One second to switch between dozens of open documents!
  • Reduce hundreds of mouse clicks for you every day, say goodbye to mouse hand.
  • Increases your productivity by 50% when viewing and editing multiple documents.
  • Brings Efficient Tabs to Office (include Excel), Just Like Chrome, Firefox, And New Internet Explorer.
Screen Shot of Excel (with Office Tab installed)
Say something here...
symbols left.
You are guest
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.

Be the first to comment.