To simply combine them you can place them all together like this:

=SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A2,"_AB","_"),"_CD","_"),"_EF","_"),"_40K",""),"_60K",""),"_S_","_"),"_","-")

(note that this may pass the older Excel limit of 7 nested statements. I'm testing in Excel 2010


Another way to do it is by utilizing Left and Right functions.

This assumes that the changing data on the end is always present and is 8 characters long

=SUBSTITUTE(LEFT(A2,LEN(A2)-8),"_","-")

This will achieve the same resulting string


If the string doesn't always end with 8 characters that you want to strip off you can search for the "_S" and get the current location. Try this:

=SUBSTITUTE(LEFT(A2,FIND("_S",A2,1)),"_","-")
Answer from Automate This on Stack Overflow
🌐
Microsoft Support
support.microsoft.com › en-us › excel › functions › substitute-function
SUBSTITUTE function - Excel 2021
Substitutes new_text for old_text in a text string. Use SUBSTITUTE when you want to replace specific text in a text string; use REPLACE when you want to replace any text that occurs in a specific location in a text string.
🌐
Exceljet
exceljet.net › home › functions › substitute function
Excel SUBSTITUTE function | Exceljet
January 23, 2026 - The Excel SUBSTITUTE function replaces text in a given string by matching. You can use SUBSTITUTE to replace or completely remove matched text. SUBSTITUTE is case-sensitive and does not support wildcards.
Discussions

How can I combine multiple nested Substitute functions in Excel? - Stack Overflow
I am trying to set up a function to reformat a string that will later be concatenated. An example string would look like this: Standard_H2_W1_Launch_123x456_S_40K_AB Though sometimes the "S" doesn't More on stackoverflow.com
🌐 stackoverflow.com
Are there any Excel alternatives that are actually BETTER than Excel?
🌐 r/excel
144
192
July 16, 2022
excel - Substitute function not replacing text - Stack Overflow
I am trying to use the substitute function in Excel to change the 05 in the first column to 04 as follows: 06-05NG22D021 --------------- 04NG22D021 06-05NG22D021-KP01 ---------- 06-04NG22D021-KP0... More on stackoverflow.com
🌐 stackoverflow.com
Using substitute to remove multiple characters at the same time
Assuming you are using Excel online or Excel 365 =REDUCE(A2,D2:D6,LAMBDA(x,y, SUBSTITUTE(x,y, ""))) Where A2 is your input cell and D2:D6 is a range holding all the characters you wish to remove. More on reddit.com
🌐 r/excel
24
6
June 28, 2024
🌐
Excel Exercises
excelexercises.com › excel-functions › substitute.html
Excel Exercises - SUBSTITUTE Function
The SUBSTITUTE function in Excel replaces a set of characters for a set of new characters within a string of text. Learn about this function and practice some exercises.
🌐
Corporate Finance Institute
corporatefinanceinstitute.com › home › resources › substitute function
SUBSTITUTE Function - Formula, Example, Excel
May 22, 2026 - The SUBSTITUTE function in Excel replaces occurrences of specified text within a string. Its syntax is =SUBSTITUTE(text, old_text, new_text, [instance_num]), where instance_num specifies which occurrence to replace.
🌐
LiveFlow
liveflow.com › product-guides › substitute-function-in-excel-explained
SUBSTITUTE Function in Excel: Explained | LiveFlow
However, there is a difference between the two functions. Use SUBSTITUTE when you want to replace specific text in a text string; use REPLACE to replace any text that occurs in a particular location in a text string.
🌐
GoSkills
goskills.com › excel › resources › excel-substitute
How to Use the Excel SUBSTITUTE Function | GoSkills
August 25, 2022 - With SUBSTITUTE, you can choose to switch out a particular occurrence of the relevant text string or switch out all instances of that string all at once. The REPLACE function can only do one unless several REPLACE formulas are nested (embedded) within each other. ... An example of how to use REPLACE is shown below. ... With this formula, we have instructed Excel to replace two characters in cell A1, starting at the character in position number 1, with the text "Microsoft."
Find elsewhere
🌐
Microsoft Support
support.microsoft.com › en-us › office › substitute-function-6434944e-a904-4336-a9b0-1e58df3bc332
SUBSTITUTE function | Microsoft Support
Substitutes new_text for old_text in a text string. Use SUBSTITUTE when you want to replace specific text in a text string; use REPLACE when you want to replace any text that occurs in a specific location in a text string.
🌐
Learnesy
learnesy.com › excel functions › learn the excel functions substitute & replace
SUBSTITUTE & REPLACE - Excel functions
So we’ll write Equals, SUBSTITUTE, select the cell, type Excel in quotation marks, and substitute it with “Word”. Every instance of the word Excel has now been switched out for Word.
Published: January 10, 2022
Views: 51
🌐
Ablebits
ablebits.com › ablebits blog › excel › find & replace › using excel replace and substitute functions - formula examples
Using Excel REPLACE and SUBSTITUTE functions - formula examples
March 21, 2023 - So, if you know the position of ... SUBSTITUTE function in Excel allows adding an optional parameter (instance_num) that specifies which occurrence of old_text should be changed to new_text....
🌐
Zapier
zapier.com › app picks › best apps
The 9 Best Excel Alternatives and Spreadsheet Software in 2026
July 9, 2026 - Collaboration. Moving on to nice-to-have features, I looked at the amount of collaboration allowed by each app. Some Excel alternatives include real-time collaboration, while others include version control and in-line commenting.
🌐
Quora
quora.com › How-do-you-write-an-excel-function-using-SUBSTITUTE-to-replace-multiple-variables-in-1-cell
How to write an excel function using SUBSTITUTE to replace multiple variables in 1 cell - Quora
Answer: I use the "find and replace" feature to substitute values. For example, if I have formulas in worksheet A referencing worksheet B; however, say I now want the formulas in A to reference worksheet C. To do this, you can select all data in worksheet A > Control Find (Ctrl+F) > "replace tab"...
🌐
MyExcelOnline
myexcelonline.com › home › substitute function – replace characters in excel!
SUBSTITUTE Function - Replace Characters in Excel! | MyExcelOnline
March 22, 2024 - download excel workbookReplaceCharacterswithSubstitute.xlsx ... text: This is the text string you want to modify. old_text: This is the text you want to replace. new_text: This is the new text that will replace the old text. instance_num (optional): It specifies which occurrence of old_text to replace. If omitted, all occurrences are replaced. Let’s say you want to substitute the space character with “-“ in “High tech” To do this, follow these steps:
🌐
LivePlan
liveplan.com › liveplan blog › managing › 5 free alternatives to microsoft excel
5 Free Alternatives To Microsoft Excel | LivePlan
May 13, 2026 - The Calc tool is compatible with Microsoft Excel files. In other words, if you already have the Microsoft 365 suite, you can easily open, edit, and save Excel spreadsheets in Calc without losing formatting or functionality.
🌐
Baserow
baserow.io › blog › best-excel-alternatives
Best Excel Alternatives for Businesses
Explore the best Excel alternatives for better data management, project tracking, and collaboration. Explore user-friendly, free and cloud-based tools.