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 / Comparing two excel sp...
Power Automate
Answered

Comparing two excel spreads sheet to find common items

(0) ShareShare
ReportReport
Posted on by 13

Hello PA forum, 

 

I'm have two workbooks, one containing blacklisted item numbers and one containing future Manufactoring orders. I need to take the blacklisted item numbers and search through the Manufactoring orders and find out which MO's contain the blacklisted items. Then make an update-list that contains both the item numbers and the corresponding MO-number, and send this list out to a teams channel. 

 

If i where to do this manually I would take each item number and use the filter function in excel to find all the rows containing the specific item number and then copy the corresponding manufactoring order into the update-list, so I would know which order to correct. The blacklist is long so I would like to have this process automated and done regularly, so I only have to do something if any black listed items occur. 

 

Do you have any ideas on how to engage this problem? 

 

As I understand the list function contains a "Find common list items" but lists are only one column of data, and therefor doesn't contain both the item number and MO-number.  Datatables on the other hand can contain multiple columns but doesn't have a "Find common" function. 

 

Would it need a different solution outside of PA desktop to handle such a task? 

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

    Something I have been using for several years is an array formula to compare two lists.  Example:

    MichaelAnnis_0-1660921859294.png


    In this example, to get this formula, enter the regular IF Formula =IF(D2=A2:A8,"Yes","No"), and instead of pressing Enter to get out, press Ctrl + Shift + Enter; this is what makes it an array formula, then you can copy it down.

     

    Hope this helps!

  • Kaif_Siddique Profile Picture
    2,108 Super User 2024 Season 1 on at

    This can be done using excel formula only. Use VLOOKUP formula. Highlighted in yellow for your reference

    Kaif_Siddique_1-1660926579048.png

     

  • Ruly Profile Picture
    13 on at

    The problem i encounter with this solution is that VLOOKUP og XLOOKUP only takes in a single cell, where I need to find all row's containing the blacklisted item number. So maybe I somehow need to use the VLOOKUP function in a more complicated way in order to locate all rows containing blacklisted item numbers. I was just hoping Power Automate had some function like "Filter table" and you then could use the "Get last row/last column" to locate what rows needed to be copied and then paste them into a new sheet.  
    But thanks for your reply!

  • Ruly Profile Picture
    13 on at

    I see your point, but I need a little more data than just "Yes" or "No". I have 234k+ rows of MO data, and I need to find all the rows containing blacklisted item numbers. So if I only get "Yes this number is in the MO's" I still need to find it. Doing it manually with the filter function in a table is really easy, but that's not as easy to automate since I, as I understand, need to use mouse movement and keyboard inputs to filter this way. That means the excel sheet need to be active on my screen, and I would like for it to just run in the background. 

    But maybe I can use this combined with some of the other solutions, so thank you for your reply! 

  • XRQ57 Profile Picture
    206 on at

    Hi,

    i think your solution is Power Query!

    You can find all the lines automatically.

     

  • Verified answer
    Ruly Profile Picture
    13 on at

    I found an solution using Power Qeury instead of Power Automate. I used one excel sheet to store MO Data (234k rows) and another sheet to store black listed item numbers. 
    Then I used Power Qeury to load the MO data, clean up item numbers (Component no) in MO data to only contain integers and then filtered the MO data for blacklisted components using the following function. 

     

    = Table.SelectRows(#"Removed Errors", each (List.Contains(BlacklistData,[Component no])=true)) 

     

    #"Removed Errors" Refers to the last aplied step in PQ and is not specific for the function. 

     

    Now I only have to figure out how to automate this Power Qeury in the cloud and the data collection of MO data.

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 474

#2
11manish Profile Picture

11manish 268

#3
David_MA Profile Picture

David_MA 243 Super User 2026 Season 1

Last 30 days Overall leaderboard