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 / Compare Excel sheet fr...
Power Automate
Answered

Compare Excel sheet from SharePoint using power automate

(0) ShareShare
ReportReport
Posted on by 8

Hello Experts!

 

Please pour your suggestions on how to create a power automate  flow for below requirement i tried with couple of ways like compare and highlight the differences and ended up with issues.

 

Requirement:

 

Every month end we will get an excel sheet which contains list of users from a project ,every month new users will be onboarded and off boarded. I need to create a flow which compare the current month data(July2021.xlsx) and previous month data(June2021.xlsx)

and  find the differences of two excel sheets and find how many new users has been onboarded and how many existing users are offboarded and need to show the differences in new excel sheet (output_diff.xlsx)

 

Expected output as below,

 

MathVict2117_0-1626730227931.png

 

 

Kindly help to suggest some ways or ideas to implement this using power automate flow

 

Thanks in advance

 

@sumurthy @Brad_Groux @abm 

I have the same question (0)
  • abm abm Profile Picture
    32,998 Most Valuable Professional on at

    Hi @MathVict2117 

     

    Please have a look at this blog

     

    Compare 2 Excel files using Power Automate (sharepains.com)

     

    Thanks

  • Verified answer
    MichaelAnnis Profile Picture
    5,727 Moderator on at

    Any Excel work is best done using VBA.  Then, the bot can open Excel, run the VBA, and produce an output.

     

    For the bot:

    1. Get your variables
      1. Prior Month
      2. Current Month
      3. Year
    2. Download the files from sharepointe
    3. Open your Bot Macro Workbook
    4. Run the Macro for monthly user comparison (see below).
    5. Upload the output file to sharepointe

     

    For the Excel VBA Macro (#4 above):

    1. Open monthlyusercomparison.xlsx (a pre-made excel spreadsheet with 3 tabs
    2. Open [PriorMonth][Year].xlsx -> Copy A:B -> Paste in A:B of Sheet ("PriorMonth")
    3. Open [CurrentMonth[Year].xlsx -> Copy A:B -> Paste in A:B of Sheet ("CurrentMonth")
    4. Write the following in C2 of Prior Month and Copy Down
      1. =IFERROR(IF(VLOOKUP(A2,CurrentMonth!$A:$A,1,FALSE)=A2,"Stay","Offboarded"),"Offboarded")
    5. Write the following in C2 of Current Month and Copy Down
      1. =IFERROR(IF(VLOOKUP(A2,PriorMonth!$A:$A,1,FALSE)=A2,"Stay","Onboarded"),"Onboarded")
    6. Copy data from PriorMonth tab to the Output tab, Paste in A1
    7. Copy data from Current Month tab, paste in first available row
    8. Filter Data for "Stay" -> Delete Visible Rows
    9. Clear Filter
    10. Save Output tab as "output_diff.xlsx" where needed

    This will work...if you don't know VBA, the Record Macro option should be good enough, and anything that is not working you should be able to troubleshoot through googling.

    Good luck

  • MathVict2117 Profile Picture
    8 on at

    Thanks a lot let me give a try and update you asap

  • MathVict2117 Profile Picture
    8 on at

    Thanks a lot for your suggestion 

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 241 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 179

#3
Haque Profile Picture

Haque 159

Last 30 days Overall leaderboard