How to Replace Keywords in a Concatenated Excel Formula With SUBSTITUTE in WPS Spreadsheets
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.

- 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.
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.
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.
Click the formula cell in WPS Spreadsheets and then click inside the formula bar.
Type SUBSTITUTE( before the CONCATENATE expression and add a comma after the expression.
Enter the placeholder text such as "#N", then a comma, then the replacement cell or expression such as B3, and type a closing parenthesis.
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").
Press Enter and check that every placeholder has been replaced by the intended value in the concatenated text.

Use LET to make a long CONCATENATE and SUBSTITUTE formula readable
Choose this method when you have many placeholders or repeated pronoun values; LET stores intermediate results and reduces repeated references.
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. Open WPS Spreadsheets: Launch WPS Office and open the workbook that contains the concatenated text data.
- 2. Go to the target cell: Select the cell where you want the personalized result and click the formula bar.
- 3. Enter the CONCATENATE formula: Type CONCATENATE with the cells that build the base text, such as =CONCATENATE(A1," ",B1).
- 4. Wrap it in SUBSTITUTE: Add SUBSTITUTE around the CONCATENATE expression and provide each placeholder and its replacement value.
- 5. Press Enter and review: Press Enter to apply the formula and verify that the placeholder keywords update as expected.

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.




