web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Replace Multiple Value...
Power Automate
Unanswered

Replace Multiple Values in Excel Based on List of Input Values

(0) ShareShare
ReportReport
Posted on by 16

I want to open an excel file go to second sheet use the txt or .xlsx file to find specific values in Column A rows and replace the value in the Column L row.

e.g I find the Number1 in the excel file from a list of input values and replace the value in column L in that row with custom text that is in the input file. Then I will look for Number2 and replace the value with custom text in input file, after all numbers are replaced in the sheet switch to sheet1 save and close the excel.

Excel File:

UiPath_0-1662552883269.png

txt.File

UiPath_1-1662553135890.png

 

Is it possible to do that with Power Automate Desktop?

 

I have the same question (0)
  • ryule Profile Picture
    929 Super User 2024 Season 1 on at

    Yes, use this action to get your row index where your "Number1" value exists, and then you can then use the other Excel actions to update values using that row index and the columns you want to update

    ryule_0-1662556060903.png

     

  • UiPath Profile Picture
    16 on at

    How to switch between sheets?

  • ryule Profile Picture
    929 Super User 2024 Season 1 on at

    ryule_0-1662569604208.png

     

  • UiPath Profile Picture
    16 on at

    I started to create the flow. 

    First step is to open excel files in a folder. I created an input variable %ExcelFilesFolder% that opens a .txt file. The txt file has list of excel files path. e.g C:\5 Sep 2022\Testing\From\names of excel.xlsx
    I refereed the variable in Launch excel.

    But, It opens the .txt file list in excel rather than opening each individual excel file.

    Should I create a For Loop?

    Step 1

    UiPath_2-1662580958458.png

    Step 2

    UiPath_0-1662580403922.png

     

  • ryule Profile Picture
    929 Super User 2024 Season 1 on at

    I'm not really following your question. But if you are saying that you have a list of Excel files in a text file, yes, the Launch Excel action can open a tab delimited text file, you can then Read from Excel for that new Excel instance, and then use that output to get started.

  • UiPath Profile Picture
    16 on at

    I mean this now it opens each excel file. Now I get to the hard part of find and replace.

    UiPath_0-1662582227297.png

     

    I don't see find and replace in my desktop 

    UiPath_1-1662582365322.png

     

  • ryule Profile Picture
    929 Super User 2024 Season 1 on at

    You have to expand the "Advanced" section

  • UiPath Profile Picture
    16 on at

    I found it now. 

    I managed to replace by entering single number to Text to Find then followed by write action.
    I am stuck at Find and Replace >> Text to Find 
    In my case, I have input as a list of values and associated new text.
    I need to check one value at a time, if excel value has a match with the values in input file. I would replace the text in column L with new text that is specific to that number. I do that for all the numbers in the excel agaist my input list finally save and close.

    How to I refer my input file that has list of values and associated new text.

    Do I need to loop through the input file?

  • ryule Profile Picture
    929 Super User 2024 Season 1 on at

    Yep, loop through it.

    If your input file is two columns (one with the value you are searching for and the other the value you are going to write), you'd use %CurrentItem[0]% as the value to search for in Excel, and then %CurrentItem[1]% in your write action

     

  • UiPath Profile Picture
    16 on at

    I created an input list variable with default value as C:\path\files.txt it won't accept. Input variable has to be List or Object or Data table. Actually, I want the input files to be an excel file because replace text has line breaks after each line. 

    UiPath_0-1662664042668.png

     

    This is my flow so far. Excel file would be my input file.

    UiPath_1-1662664641554.png

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 419

#2
Vish WR Profile Picture

Vish WR 314

#3
David_MA Profile Picture

David_MA 260 Super User 2026 Season 1

Last 30 days Overall leaderboard