Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Move Row from 1 worksheet to another based on key words

(1) ShareShare
ReportReport
Posted on by 4
I would like to Automate a workflow that pulls data from 1 worksheet to another worksheet (Same Workbook) based on Department name. Example: I want all Engineer data pulled from main data worksheet and added to Engineering worksheet. Then when the department is changed to a different department, you re-run the automation to move the information to the specific worksheet again.
  • Michael E. Gernaey Profile Picture
    44,770 Super User 2025 Season 1 on at
    Move Row from 1 worksheet to another based on key words
     
    So I would be careful here, because there isn't a way for Power Automate to do this when a Cell is updated. As the file would be currently opened and locked. Which would make this a local Script issue and go to the Office people for help writing the Script that you could trigger.
     
    If people are opening the file directly and its in One Drive then you will be hosed as
    1) its locked we wont even be able to open it or use Graph or use Run a Scripted from Power Automate Cloud
     
    It would require that another copy is updated and that is placed overtop of the existing one in One Drive for the options to work, at least the ones other than a Script in the workbook itself.
     
    So you could either
    1) Use a script in the workbook and have the person run that
    2) use power automate desktop but to me thats overkill
  • SS-17071639-0 Profile Picture
    4 on at
    Move Row from 1 worksheet to another based on key words
    1. Where is this file stored? One-Drive
    2. How is the flow triggered? Either by a button in the workbook or Power Automate
    --Is it anytime the file is updated? Yes, this would be done a new cell is filled out.
  • Verified answer
    Michael E. Gernaey Profile Picture
    44,770 Super User 2025 Season 1 on at
    Move Row from 1 worksheet to another based on key words
     
    Is this for Cloud Flows or Power Automate Desktop? I just want to be sure.
     
    Primarily the work is not hard as the previous person mentioned, but it does matter how this is triggered.
     
    1. Where is this file stored?
    2. How is the flow triggered? 
    --Is it anytime the file is updated?
     
    Its not difficult, you simply need to have input variables on the trigger or some other configured way for it to know "which" filtering it will be doing that time.
    Then use that in your List rows in a Table to filter out the data you want.
    Then you can use an Apply to each to "Copy" the data to the other sheet (as mentioned there is no move) so if you want the original rows removed you have to do that after the copy.
     
    Also note, that after you do the copy (meaning loop through the rows, and do an add row to table) to the other sheet, you may have to add a 10 minute delay action to unlock the Excel file before you could delete the original rows. IF you need to delete them. This is a known issue with Excel.
     
    Another option would be to use an Excel Script to move the data, and this script could be called from Power Automate and it could do the copy/delete for you.
     
    You could also use Graph API to do it.
     
    Depending on what you need to do, and types of error handling and volume of rows, i would recommend option 1 just so you have a bit more control than the Script or Graph but up to you.
     
    If these suggestions help resolve your issue, Please consider Marking the answer as such and also maybe a like.
    Thank you!
    Sincerely, Michael Gernaey
  • lbendlin Profile Picture
    8,065 Super User 2025 Season 1 on at
    Move Row from 1 worksheet to another based on key words
    There is no "move"  command for that.  You read from a table in worksheet A, then write to a table in worksheet B, and then delete the row from table A.
     
    Once you deleted the row it is gone, so you cannot repeat the process with the same row.

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1