You can do this without vba, with Power Query.
The table at cell A1 of the Data sheet is a proper Excel Table named Table1
The table at cell A1 of the Location sheet is a proper Excel Table named Table2
If you change the data in either of those tables you'll need to refresh the ResultTable table at cell C1 of the Data sheet by right-clicking it and choosing Refresh.
Sheet1 also contains a formula solution in cell B2 which is copied down.
Last edited by p45cal; 10-02-2022 at 02:30 PM.
p45cal Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.