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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Automate
Answered

Update excel data

(1) ShareShare
ReportReport
Posted on by 90
Hi all,
I am trying to update an Excel sheet based on data in one column using Power Automate. In the example below, I need to update the ID column and Description column based on the Units column data. The ID column data should sequentially increase automatically in the format A2, B1, C1, D1, A2, B2, C2, D2, A3, B3, and so on. The Description column should update based on the Units column data. For example, if the Units column contains "KG," Power Automate should update the Description column to "Kilogram"; if it contains "ML," it should update to "Milliliter"; if it contains "CM," it should update to "Centimeter"; and if it contains a 9-digit integer, it should write "Sample." Please guide me on how to achieve this. Thanks in advance!
 
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,360 Super User 2025 Season 2 on at
    HI,
     
    Here is a step by step guide to do this. If you follow this and have questions let me know.
     
    Question: 
    * What is the interval that you need this to happen??
     
    Since I don't know I am going to generate a Triggered Manual Flow
     
    Pre-Information before flow.
    1. Your Excel Data must have an Excel Table around it. You have 2 options. You can put the Table in before , or you can do use the Create Table actions in Power Automate to create it. This isn't something I can decide for you, so I am going to simply give you ... option(s) in the steps below
     
    2. You will need the file path and table name (if you predefine it) so youll need to have that information either hard coded, or in an Environment Variable or in a SharePoint List, or Flat File. Somewhere you can get it at run time
     
    Flow steps
    1. Create a new cloud Manual Flow (You can switch the trigger later)
    2a. If your Excel does NOT have a table in it, You need to add a Create Table (excel step), you will need to know the Sheet, the Columns etc for this action
     
    2b. If your Excel has a Table in it its easier so do nothing to in this step
     
    3. Add a List Rows in Table for Excel Action
    This will return back data based on the File, Table you tell it
     
    4. Add a Condition Action
    In the Left side put length(DynamicBody/ValueOutputfromStep3) , where length() is an expression. So when you click in the left side it popups up the 
    dynamic window. Tab 1 is dynamic properties, Tab 2 is the Exrpressions
    Click Expression tab first, type length() thats ( ) with no space
     
    Not click tot he Dynamic Property Tab and click inside the() and scroll till you get the Output dynamic property of step 3
     
    in the middle put greater than
    on the right put 0
     
    5. in the Yes side of the Action
    This is where you will iterate through your rows and do updates
    Add an Update row in a table for eXcel
     
    In the Loop, each loop is the Row you are on
     
    Here you can either have a Single Compose Action that will be used to generate the String you want in Column 3
    Or
    You can adad a Switch, and have the input be column 2
    Then in 3 different paths, each path could either have an update action where you hard code the value for column 3 based on the Switch Check
    or you can set a Compose etc
     
    Now add an Update Row in Table for excel, specify the Key for the row
     
    And done.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard