How to Compare 2 Lists in Excel with a single formula!

Apr 23,2025

Access Analytic

2013-12-03T14:41:17Z

🧑🏻‍🎓Learning Power BI? Check out our online course
https://accessanalytic.thinkific.com/


Want to level up your Excel game? In this tutorial, you’ll learn how to create a dynamic LAMBDA function in Excel to compare two lists and instantly highlight differences. From simple side-by-side list comparisons to fully parameterized and stackable functions using LET, FILTER, XMATCH, ISNA TRIMRANGE and LAMBDA, this video walks through the entire logic behind the scenes. You’ll even get a downloadable file and access to a Lambda Gist so you can plug-and-play the magic in your own workbooks.

Whether you’re cleaning data, verifying imports, or managing inventory, this approach will help you spot mismatches fast and flexibly. You’ll see how to avoid common formula errors, trim empty ranges, and keep your sheet lightweight and responsive. Stick around to the end to learn how to save it all into a reusable custom function for future projects!

LAMBDA GIST
https://gist.github.com/wynhopkins/2efdf218ed78be03a0a082ff6a99dad1

Download the file
https://aasolutions.sharepoint.com/:f:/s/PubliclyAvailableContent/Ev553Kvqt8dCujXbUApZ1X8B8XoVQuT5AU0VzgN7HIzFqQ?e=1T7e8f

Join the channel to get access to perks:
https://www.youtube.com/channel/UCvD2rJJrp0aS48-KCk0eMHQ/join


Did you know I've written a book "Power BI for the Excel Analyst"?
https://pbi.guide/book/

The team and I at Access Analytic develop Power BI and Excel solutions for clients in Australia and deliver training around the World. https://accessanalytic.com.au/


00:00 Introduction
01:00 Building the Comparison Logic with XMATCH
02:30 Filtering the First List by Differences
03:30 Wrapping in LET for Better Control
05:00 Using HSTACK and Handling Errors
07:00 Adding Headings and Handling Empty Outputs
09:00 Finalizing the Lambda Function
11:30 Importing Lambda Gist and Reusing Across Workbooks

Excel tipsExcel formula tutorialcompare lists ExcelExcel lambda functionExcel custom functiondata cleaning ExcelExcel 365 featuresdynamic Excel functionsExcel filter formulacompare two columnsExcel VBA alternativeExcel automationExcel xmatchExcel let functionExcel power toolsExcel for analysts