One of our clients contacted us regarding a requirement where they had an Excel file containing project details and associated company information for 2025, which is stored on their local desktop.
The requirement is to replace one of the Associated Company names in the Excel sheet, as it has recently changed its name.
We can achieve this using Power Automate Desktop, automatically, without needing to do it manually.
In this tutorial, I will explain how to find and replace text within a string using Power Automate Desktop. It will cover the different examples of replacing text, such as:
- Replace text with another text in the variable Power Automate Desktop
- Replace text with nothing using Power Automate Desktop
- Find and Replace text in DataTable Power Automate Desktop
- Find and Replace text in Excel using Power Automate Desktop
Replace Text using Power Automate Desktop
Here, I will manually enter a text string that represents the contact email of our Organization.
The string I used: [email protected].Now, I wanted to replace the text ‘tsinfotech‘ with ‘tsinfotechnologies.com‘.
Let’s see how to do this in PAD. Check out the steps below.
- Open your Power Automate desktop app and create a flow. If you are a beginner, consider checking out how to create a Desktop flow.
- From the Actions pane, drag and drop the ‘Set variable‘ action to declare the text string value. In the Value parameter, provide the text and click on the Save button.

- To replace the text from a string, take the ‘Replace text‘ action to the workspace. Set the parameters below and click on the Save button.
- Text to parse: Click on {x} -> Select variable produced from the previous step.
- Text to find: Provide the text that you want to replace. In my case, it is tsinfotech.com.
- Replace with: Enter the replacement text within single quotes % ”%.

- Now, take a ‘Display message‘ action to show the replaced text string. Provide Title and Message to display as ‘Variable of Replace Text’ action. Save the action.

Save and run the flow manually.
- After the flow execution, you can see the output of the replaced text in the message box. Look at the reference image below.

This is how you can use the Replace text action in Power Automate Desktop to replace one text string with another string.
Check out Power Automate Replace Text in File
Replace Text with Nothing in Power Automate Desktop
This example will demonstrate how to replace the text with nothing using Power Automate Desktop.
Let’s consider a text string variable that stores the Product Price in Dollars: ProductPrice – $1000. Here, my requirement is to represent the product price of $ 1,000 as simply 1000.
So, I wanted to replace ‘$’ with nothing from the presented text string, i.e.,$1000.
We can use the ‘Replace text’ action in Power Automate desktop to meet this requirement.
By following the example above, you might already know how to create a flow in Power Automate desktop. Let’s start with the steps below.
- On to the Power Automate desktop workspace, declare the ‘Set Variable‘ action with the value to be $1000. I have renamed the variable to ‘ProductPrice’.

- Then, search for ‘Replace text‘ in the actions pane and drag & drop it into the workspace. Set the required parameters below. Click on the Save button.
- Text to parse: Take the ‘ProductPrice’ variable of the set variable.
- Text to find: Provide the text that you wanted to replace.
- Replace with: Set the value to two single quotes in between % signs. This will take the value as nothing.
I have renamed the variables produced to ‘ReplaceNothing’.

- To show the output from the previous step, add a ‘Display message‘ action to the workspace. Set the title to the message box and the message to display with the Replace text variable.

Save and execute the flow.
Output: It will display the replaced string [$1000 ->1000]

This is how to replace the text with nothing in Power Automate Desktop.
Read Update Data Table Items using Power Automate Desktop
Find and Replace Text in Data Table Power Automate Desktop
Below, you can see that I have a data table with ‘Employee Details’ containing columns for Employee Name, Department, and Role.

From the given data table, I wanted to replace the Department value of ‘Human Resources‘ with ‘HR‘ within the entire data table, wherever it is present.
Here are the quick steps to replace the text in a data table:
- First, I created a data table using the “Create new data table” action. I have renamed the variables produced to EmployeeDataTable. Save the action.

- Then, drag & drop the ‘Find or replace in data table‘ action that will replace the data table values. Configure the required parameters.
- Data table: Select the data table variable.
- Search mode: Choose the Find and Replace option to replace the text.
- All matches: Toggle on this if you want to replace it everywhere in the data table.
- Text to find: Provide the text that you wanted to replace. Ex: Human Resources.
- Text to replace with: Enter the replacement text. Ex: HR.
It will produce the DataTableMatches variable. Then, click on the Save button.

- To show the output from the data table, add a ‘Set variable‘ action and pass the value from the data table variable. Tap the Save button to save the action.

Save and run the flow.
Output:
- After the flow execution, open the flow variables [Set variable]. You can see that the data table values have been replaced with text.

Check out Add Excel Table into HTML Email Body using Power Automate Desktop
Find and Replace Text in Excel using Power Automate Desktop
Suppose I have an Excel file named ‘Projects & Associated Companies 2025’ with the following data, as shown in the screenshot below.

From this Excel data, I wanted to replace the specific text with another text.
For example, I wanted to replace ‘NeuralNet AI’ with ‘NeuralNet AI Technologies Pvt Ltd’ as they have recently changed their company name, which is present in the list of companies.
Create a flow in Power Automate Desktop and add the actions below to it.
Here are the steps to do it:
- To open the Excel file saved on your local desktop, expand the Excel connector in the Actions pane. Then, drag and drop the “Launch Excel” action to the workspace. Provide the below information.
- Launch Excel: Choose and open the following document option.
- Document path: Click the insert file icon and select your Excel file.
- Make instance visible: You can enable this option to display Excel on the taskbar during flow execution.
This action will produce a variable named ExcelInstance. After that, click on the Save button.

- After that, add the ‘Find and replace cells in Excel worksheet‘ action that will replace the text string with another text. Set the parameters below.
- Search mode: Select the Find and Replace option.
- All matches: Toggle ON to replace everywhere in the Excel sheet.
- Text to find: Provide the text to replace.
- Text to replace with: Enter the text that needs to be replaced.
- Match case: Toggle On to check the text as case-sensitive. Like, it will only match the exact text.
- Match entire cell contents: Toggle on this option if you want to match search text with the full content of the cell.
- Search by: Select Columns, if the text you are replacing is present in one column.
Then, click on the Save button to save the action to the workspace.

- In the final step, add the “Close Excel” action and select the ‘Save document’ option to save the replaced text values in the Excel sheet. Click on the Save button.

- When the flow is ready, save and run the flow. After the flow execution is completed, you can see the replaced text values in the Excel file.
- Have a look at the reference screenshot.

This is about finding and replacing text values using Power Automate Desktop.
In this tutorial, we saw four different examples of finding and replacing text strings in Power Automate Desktop.
Please mention your suggestions and questions about this in the comment section below.
You may also like the following Power Automate tutorials:
- Insert Row into Data Table in Power Automate Desktop
- Extract Tables from PDF by Power Automate Desktop
- Update Data Table Items using Power Automate Desktop
- Extract Data from an Excel using Power Automate Desktop

After working for more than 18 years in Microsoft technologies like SharePoint, Microsoft 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Our audiences are from the United States, Canada, the United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a Microsoft SharePoint MVP (12 times). I have also worked in companies like HP, TCS, KPIT, etc.