Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mjamesd/ff8f3c2692348ec3c3db9c1cc022c89f to your computer and use it in GitHub Desktop.
Save mjamesd/ff8f3c2692348ec3c3db9c1cc022c89f to your computer and use it in GitHub Desktop.
Microsoft Excel: Reference a named table's column from another workbook
I couldn't find this answer via an Internet search so I am adding it here.
Trivial case:
-TableA is in Workbook1.xlsx and has three columns: ID, Name, Date
-TableB is in Workbook2.xlsx and has two columns: Name, FavFood
-User wants to combine the tables on the Name column and include ID, Name, Date, and FavFood.
1. Add a column to Table A and label it FavFood.
2. In the first cell of the new FavFood column, type this forumal:
=INDEX(Workbook2.xlsx!TableB[FavFood], MATCH([@Name], Workbook2.xlsx!TableB[Name],0))
3. The FavFood data from TableB will now populate in TableA.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment