Function Problems

How to Replace Keywords in a Concatenated Excel Formula With SUBSTITUTE in WPS Spreadsheets

Natalie TaylorNatalie Taylor Nov 13, 2026 870 views

Question details

The user needs to replace placeholder keywords such as names and pronouns inside text created by a CONCATENATE formula by nesting SUBSTITUTE functions, without copying the result to another cell.

How to Replace Keywords in a Concatenated Excel Formula With SUBSTITUTE in WPS Spreadsheets
Product
WPS Spreadsheets
Device & OS
not provided
Scenario
The user is building a dynamic text string with CONCATENATE and wants personalized output by replacing placeholders with values from other cells.
Observed behavior
The concatenated text shows placeholders such as #N, #E, #h, and #H unless the formula is wrapped in SUBSTITUTE; the goal is to have those placeholders replaced directly inside the formula.
Before you start

Open the workbook in WPS Spreadsheets and identify the cells that contain the concatenated text values and the replacement values, such as B3 for a name and C3 for a gender flag.

Solution 1Recommended

Wrap the CONCATENATE formula in nested SUBSTITUTE functions

Use this method to replace multiple placeholders directly in the original formula, so the result updates automatically without helper cells.

SUBSTITUTE replaces matching text with the value you specify. Place the entire CONCATENATE expression inside the first SUBSTITUTE and nest one additional SUBSTITUTE for every placeholder you need to replace.

1
Select the cell with the CONCATENATE formula

Click the formula cell in WPS Spreadsheets and then click inside the formula bar.

2
Start the first SUBSTITUTE wrapper

Type SUBSTITUTE( before the CONCATENATE expression and add a comma after the expression.

3
Add the placeholder and its replacement

Enter the placeholder text such as "#N", then a comma, then the replacement cell or expression such as B3, and type a closing parenthesis.

4
Nest additional SUBSTITUTE functions

For each remaining placeholder, wrap the previous SUBSTITUTE result with another SUBSTITUTE( and provide the placeholder and its replacement, for example "#E" with IF(C3="f","She","He").

5
Confirm the formula

Press Enter and check that every placeholder has been replaced by the intended value in the concatenated text.

Wrap the CONCATENATE formula in nested SUBSTITUTE functions
Result updates automatically: When the source cells change, the CONCATENATE result and all nested SUBSTITUTE replacements recalculate together.
WPS Spreadsheets formula help

Create dynamic personalized text with SUBSTITUTE and CONCATENATE in WPS Spreadsheets

Use WPS Spreadsheets to keep your concatenated text in one cell and replace names, pronouns, and other placeholders automatically with nested SUBSTITUTE functions.

  1. 1. Open WPS Spreadsheets: Launch WPS Office and open the workbook that contains the concatenated text data.
  2. 2. Go to the target cell: Select the cell where you want the personalized result and click the formula bar.
  3. 3. Enter the CONCATENATE formula: Type CONCATENATE with the cells that build the base text, such as =CONCATENATE(A1," ",B1).
  4. 4. Wrap it in SUBSTITUTE: Add SUBSTITUTE around the CONCATENATE expression and provide each placeholder and its replacement value.
  5. 5. Press Enter and review: Press Enter to apply the formula and verify that the placeholder keywords update as expected.
Nested SUBSTITUTE replaces placeholders without copying the result to another cellFull compatibility with Microsoft Excel .xlsx and .xls workbooksFamiliar Excel-style formulas and function namesFree to download and use for personal, student, and professional workLET support helps simplify long dynamic text formulas
microsoft office alternative - wps office

Frequently Asked Questions

Can I use SUBSTITUTE with CONCATENATE without pasting the result into another cell?

Yes. Put the entire CONCATENATE expression as the first argument of SUBSTITUTE, for example =SUBSTITUTE(CONCATENATE(A1,B1),"#N",B3), and the replacement happens directly in the formula cell.

How do I replace multiple placeholders in one concatenated formula?

Nest one SUBSTITUTE for each placeholder. The inner SUBSTITUTE runs first, and the outer SUBSTITUTE receives its result, so you can replace #N, #E, #h, and #H in a single formula.

Does SUBSTITUTE work the same in WPS Spreadsheets and Microsoft Excel?

Yes, SUBSTITUTE and CONCATENATE follow the same Excel-compatible syntax in WPS Spreadsheets, so workbooks using these formulas can be opened and edited in both applications.

Can I replace a placeholder with different text based on a condition?

Yes. Use IF as the replacement argument, such as SUBSTITUTE(CONCATENATE(...), "#E", IF(C3="f","She","He")), to choose a value based on another cell.

What can I do if the nested SUBSTITUTE formula becomes too long?

Use LET to store the concatenated paragraph and the pronoun values under names, then reuse those names in SUBSTITUTE. If LET is not available, keep a nested SUBSTITUTE structure or split the text into helper cells.