Active Member
May 24, 2024
I have two Excel files containing lists of stock names that I need to compare. I want to identify which stock names are present in both files. Additionally, I need to perform this comparison across multiple files over time, such as weekly files from the last 3 months.
What is the easiest and most efficient way to compare the stock name lists across these multiple Excel files to find the overlapping stock names? I'd like a solution that can scale to handle a larger number of files in the future as well.
Moderators
January 31, 2022
With only two files you connect to each of them and do a merge with an Inner Join to get the 'overlapping' names.
Now I'm not sure where the "weekly files from the last 3 months" come into play. Do you want to find the overlapping names for the most recent week compared with the week before it? Or do you want to see the names that are present in all of the weeks, perhaps?
Assuming it's the first option, connect to the folder containing all the weekly files, keep the two most recent ones based on their creation dates. Combine these files two and Group (Count) by stock name. All names with a count of 2 are the overlapping ones.
Perhaps this will help you on your way. If not, come back here.
VIP
Trusted Members
December 7, 2016
Hello,
Check this blog article about using Power Query Get Files from a Folder, see if that would work for your scenario. You can also check out this article on how to Easily Compare Multiple Tables in Power Query.
Br,
Anders
1 Guest(s)