Join Multiple Tables in a PivotTable Without VLOOKUP

Apr 8, 2021 • 6 min read

Creating a PivotTable often starts with a lot of preparation. We copy the source data into a worksheet, then add VLOOKUP formulas to bring in product names, branches, and other categories. Only then can the analysis begin.

But we don’t need all those VLOOKUPs. Excel relationships let us combine fields from multiple tables in a single PivotTable, without adding lookup formulas to the source data.

This capability has been available since Excel 2013, yet it’s easy to overlook. We’ll use three separate tables to summarize sales by product and branch, then look at the important rule that keeps those relationships working.

You can follow along with the example workbook.

What You'll Learn

  • Excel relationships let one PivotTable analyze multiple tables without VLOOKUP formulas.
  • Convert each dataset into a named Excel Table before creating relationships.
  • Build the PivotTable from the Data Model to access fields across related tables.
  • Keep matching IDs unique in lookup tables to prevent relationship refresh errors.

Understand the Three Source Tables

Our example contains three datasets:

  • Sales data: The transactions, including Product ID, Sales Rep ID, and the sales Value we want to analyze.
  • Sales rep data: Information about each sales representative, including their Sales Rep ID and Branch.
  • Product data: Product IDs and their corresponding product names.

All three datasets are on one worksheet to make the example easier to follow. They could just as easily be on separate worksheets.

The sales dataset contains the transactional information. In database terminology, this is a fact table. The sales rep and product datasets contain the categories by which we want to analyze those transactions. These are called dimension tables, or lookup tables.

The matching IDs provide the connections. Product ID links each transaction to a product, while Sales Rep ID links each transaction to a sales representative and, through that representative, a branch.

Excel worksheet with arrows linking matching ID columns across three datasets
The matching ID fields connect transactions to the product and sales rep lookup data.

Our goal is a PivotTable with product names down the rows, branches across the columns, and total sales values in the middle. Those fields come from three different tables.

Step 1: Convert Each Dataset into an Excel Table

First, we need to turn each source range into an actual Excel Table. Having data arranged in rows and columns isn’t quite the same thing.

  1. Select any cell within the sales dataset.
  2. Click Insert > Table.
  3. Check the range in the Create Table dialog box. In the example, the sales data occupies A1:E21.
  4. Confirm that My table has headers is selected, then click OK.
  5. On the Table Design tab, change the Table Name to SalesData and press Enter.

Excel applies a table style, which gives us a useful visual indication that the range is now a Table. The blue stripes aren’t compulsory. You can choose another format from the Table Styles gallery.

Repeat the same process for the other two datasets, using these meaningful names:

  • SalesRepData for the sales representative lookup table.
  • ProductData for the product lookup table.

Naming the tables makes the next step much easier. Selecting SalesData from a list is far clearer than trying to remember what Table1 contains.

Step 2: Create the Relationships

Go to Data > Data Tools > Relationships. Depending on the width of the Excel window, the Relationships command may appear as a small icon rather than a labeled button.

In the Manage Relationships dialog box, click New.

What the Relationship Settings Mean

The Create Relationship dialog uses a little database terminology. The labels aren’t particularly obvious, so here’s how to read them for this example:

  • Table: The table containing the transactions or values we want to analyze. Here, that’s SalesData.
  • Column (Foreign): The column in the transaction table containing the ID we want to match. This column can contain repeated IDs because several transactions may relate to the same product or sales representative.
  • Related Table: The lookup table containing the categories we want to use in our analysis.
  • Related Column (Primary): The matching ID column in the lookup table. Its values must be unique.

If you’re thinking in VLOOKUP terms, the foreign column contains the lookup values. The primary column plays the role of the first column in the VLOOKUP table array.

The two matching columns don’t need to have the same name. However, if you’re setting up the data yourself, using consistent names makes the relationships easier to understand.

Set up the first relationship as follows:

  • Table: SalesData
  • Column (Foreign): Sales Rep ID
  • Related Table: SalesRepData
  • Related Column (Primary): Sales Rep ID
Create Relationship dialog linking SalesData and SalesRepData through Sales Rep ID

Click OK. The relationship now appears in Manage Relationships.

Click New again and create the second relationship:

  • Table: SalesData
  • Column (Foreign): Product ID
  • Related Table: ProductData
  • Related Column (Primary): Product ID

Click OK, then click Close in Manage Relationships.

We now have two relationships connecting our three tables. The source tables remain separate, but Excel knows how their records relate to one another.

Step 3: Create a PivotTable from the Data Model

The next step is slightly different from creating a PivotTable from a single worksheet range. We need to use the workbook’s Data Model.

  1. Go to Insert and open the PivotTable dropdown.
  2. Select From Data Model.
  3. Choose where to place the PivotTable. For this example, select Existing Worksheet and use cell G10.
  4. Click OK.

The route varies between Excel versions. If you don’t have a From Data Model command in the dropdown, open the Create PivotTable dialog and select the option to use this workbook’s Data Model.

In the PivotTable Fields pane, you should now see all three tables, rather than a single flat list of source columns.

Add Fields from All Three Tables

Expand the tables and arrange the fields like this:

  • Drag Product from ProductData into Rows.
  • Drag Branch from SalesRepData into Columns.
  • Drag Value from SalesData into Values.

Excel creates Sum of Value. This automatic aggregation is called an implicit measure: we’ve asked Excel to sum a field without writing a separate measure formula.

Completed PivotTable with products in rows, branches in columns, and Sum of Value in the Values area
One PivotTable now uses product, branch, and sales value fields from three separate tables.

That’s our analysis complete. Products appear down the rows, branches appear across the columns, and the middle contains the total sales values for each combination.

We’ve combined three tables in a PivotTable without writing a single VLOOKUP formula.

Keep Lookup IDs Unique to Avoid Refresh Errors

There’s one important rule to remember: the primary ID column in each lookup table must contain unique values.

Repeated IDs in SalesData are expected. A product can appear in many sales transactions, and a representative can make many sales. But Excel needs one matching record for each ID in ProductData or SalesRepData.

For example, adding a second copy of an existing Sales Rep ID to SalesRepData causes a problem when we select Data > Refresh All. Excel reports an error because the lookup side of the relationship now contains a duplicate key.

To correct the example:

  1. Remove the extra duplicate entry from the sales rep lookup table.
  2. If clearing the entry leaves an unwanted extra table row, resize the table using its bottom-right corner.
  3. Select Data > Refresh All again.

With the duplicate removed and the table range corrected, the refresh works again. This uniqueness requirement applies to the matching ID column, not every descriptive column. Several sales representatives can belong to the same branch.

You’ve Already Used the Power Pivot Engine

There’s something else happening here that isn’t immediately obvious. By creating relationships and building a PivotTable from the Data Model, we’ve used Excel’s Power Pivot engine.

We didn’t need to open the Power Pivot window or enable its add-in to complete these steps. The standard Excel interface gave us access to the relationship functionality.

If the Power Pivot add-in is enabled, we can inspect the model by selecting Power Pivot > Manage, then switching to Diagram View.

Power Pivot Diagram View showing ProductData and SalesRepData connected to SalesData
Diagram View makes the two lookup tables and their connections to the sales fact table easy to see.

Arrange the dimension tables at the top and the sales fact table beneath them, and the structure becomes clear. This is a simple star schema, with lookup tables connected to a central transaction table.

The practical benefit is straightforward: keep transactions and categories in separate tables, connect them using matching IDs, and let the Data Model bring them together for analysis. There’s no need to build a worksheet full of lookup formulas before creating the PivotTable.

Share

Excel Off The Grid

I help you reduce repetitive Excel work with practical guides to formulas, Power Query, reporting, and automation.

© 2026 Excel Off The Grid
Powered by Convella