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 / Excel file fitration u...
Power Automate
Unanswered

Excel file fitration using Power Automate Desktop

(0) ShareShare
ReportReport
Posted on by 2

Hello everyone,

 

I am currently facing an issue with a flow, would be thankful if you can help.

 

I am trying to filter the Excel file based on the first column data. Condition - The data in that column should be integer.

Based on that filtration I will copy that row into new Excel file. 

 

One more thing, the data in the excel does not have finite rows and contains multiple blanks(free rows) in between.

I have the same question (0)
  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    I say it every time, VBA is better if you are only dealing with Excel.  Whether you are using VBA or PAD, the same logic should work for both; the PAD solution is below:

     

    Set variables which will be used to count each time a destination workbook is used.  Set them to 0.

    (ex. Set DestinationWorkbookUnder100Counter to 0)

    'we will use these counters during the loop

    Launch Excel

    Get Last Row

    Read from Excel (Range A1:A(Last Row) and save to ExcelData (a list)

    For each CurrentItem in ExcelData

    Select Row, Copy

    Switch CurrentItem'use Switch to go through the correct process using the right workbook

    Case <100

    Set DestinationWorkbookUnder100Counter to %DestinationWorkbookUnder100Counter + 1%

    If DestinationWorkbookUnder100Counter = 1 'If it's the first time, open the workbook

    Open WorkbookUnder100.xlsx

    EndIf

    If DestinationWorkbookUnder100Counter >1 'If the workbook is already opened

    Focus Window 'not mandatory to focus, but nice to see what it is doing when debugging

    Attach to Excel

    EndIf

    Select Row (DestinationWorkbookUnder100Counter)

    Paste

    Case...

    Case...

    Case...

    End 'Switch

    End 'For Each

    'Save and Close all workbooks

    IF %DestinationWorkbookUnder100Count > 0

    Attach to Excel

    Save and Close Excel

    End If 

    'Repeat for all other Destination Workbooks

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    1) read Excel range in column A

    2) create a subflow to delete row in excel

    3) loop condition from the last row: convert text to number[last row], On Error run subflow in step 2 with the current loopindex (or adjust the variable if you have title on row 1)

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 276 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 169

#3
Haque Profile Picture

Haque 154

Last 30 days Overall leaderboard