You create a relationship in Excel by loading your tables into the Data Model and then telling Excel which columns in each table hold the same values. The quickest route is to convert each range to a Table, click inside one of them, and go to Data > Relationships > Manage Data Model or use Data > Relationships > New to define the link. A relationship is simply a join that lives behind the scenes: two tables share a column, such as Customer ID, and Excel uses that shared column to pull figures from one table into a report built on the other. You never merge or copy the data, so the source tables stay intact and both refresh independently.

This matters most when you build PivotTables from more than one table. Instead of pasting lookup formulas down thousands of rows, you drop a PivotTable that uses the Data Model and drag fields from both tables into the same layout. Amounts from an Orders table can be sliced by Region from a Customers table without VLOOKUP, INDEX/MATCH or a helper column. The same relationships power Power Pivot and, on the desktop app, Data > Get Data queries. Note that menu labels can differ slightly by Excel version, device and region, and that relationships are faithful to the desktop Windows app; the Mac and web versions offer a reduced set of Data Model tools.

What You'll Need

  • A desktop version of Excel (Windows is the most complete for this; Mac works for basic relationships through the Data Model dialog).
  • At least two data ranges, each tidied into a proper table: one row of headers, no blank rows, no merged cells, no totals rows mixed into the data.
  • One column in each table that holds matching values. The standard pattern is a unique ID in the lookup table (Customers) and the same ID repeated in the fact table (Orders).
  • Consistent data types in the key columns. Both sides must be text or both numeric; a Customer ID stored as text in one table and as a number in the other is the most common cause of failure.
  • Clean key values: no leading or trailing spaces, no stray apostrophes, no mixed casing unless both sides match.

Step-by-Step

  1. Turn each range into a Table. Click anywhere in the first range and press Ctrl+T (Windows; Cmd+T on Mac), confirm the range and that My table has headers is ticked, then click OK. Give the table a meaningful name on the Table Design tab in the Table Name box. Repeat for the second range.
  2. Check the key column. In the lookup table, confirm each value in the key column appears exactly once. In the fact table, the same values can repeat as often as you like. If the lookup table has duplicates, Excel cannot build a one-to-many relationship and will report an error.
  3. Verify the data type. Click the key column in each table, then look on the Home tab at the number format box. Both columns should show the same format. If one is Text and the other General or Number, convert them: select the column, then use Data > Text to Columns and finish, or choose the format from the number format dropdown. A green triangle in the corner of cells signals a number stored as text.
  4. Add the tables to the Data Model. Click inside the first table and choose Data > Relationships > Manage Data Model, or insert a PivotTable and, in the Create PivotTable dialog, tick Add this data to the Data Model. Then add the second table the same way. Both tables must live in the same workbook for Excel to link them.
  5. Open the relationship dialog. Go to Data > Relationships and click New.
  6. Pick the tables. In the Table dropdown choose the table on the many side (Orders, where IDs repeat). In the Related Table dropdown choose the table on the one side (Customers, where IDs are unique).
  7. Pick the columns. Select the key column under each dropdown. Excel should auto-detect matching names such as CustomerID; if not, select them manually.
  8. Read the cardinality line. The dialog shows something like One to Many. That is what you want: one row in Customers to many rows in Orders.
  9. Click OK. If the columns are compatible, the relationship is created and appears in the Data Model. No data is copied and no visible column changes in your sheets.
  10. Build a PivotTable on the model. Choose Insert > PivotTable, tick Add this data to the Data Model, and place it on a new worksheet. The field list now shows both tables, with a small table icon next to each.
  11. Drag fields from both tables. Put a field from Customers (for example Region) in Rows and a numeric field from Orders (for example Amount) in Values. The presence of the relationship lets the two combine without lookup formulas.
  12. Test it. Compare one total against a manual sum for a single customer to confirm the join behaves as expected before you rely on the report.

Common Mistakes

  • Mismatched data types. Numbers stored as text are the number one culprit: Excel sees 1001 and "1001" as different values and creates a one-to-one or no link at all.
  • Duplicates on the one side. If the lookup table repeats a key, Excel cannot guarantee a single match and refuses or misbehaves. Remove or aggregate duplicates first.
  • Choosing the tables the wrong way round. The one side must be the table with unique keys. Reversing them creates a many-to-one join in the wrong direction.
  • Building the PivotTable from the sheet range instead of the model. If you do not tick Add this data to the Data Model, the field list shows only one table and the relationship is invisible.
  • Hidden blanks. Spare spaces, non-breaking spaces or trailing apostrophes make visually identical keys fail to match. Trim and clean the key columns.
  • Undeclared totals or notes rows. These confuse the table structure; keep totals out of the table body.

Tips

  • Add a dedicated Calendar table if you work with dates. One date table related to every fact table lets you filter all reports by month or year with a single slicer.
  • Name tables clearly (Orders, Customers, not Table1). The relationship dialog lists table names, so readable names save time.
  • Keep key columns narrow and clean; use a single ID rather than compound keys made of several columns.
  • Relationships are many-to-one or one-to-many only. If you genuinely need many-to-many, route it through a bridging table rather than forcing it.
  • Refresh all queries before you check a relationship, so the keys in both tables are current.

Troubleshooting

The OK button is greyed out. Usually the column types differ or one dropdown is empty. Check both key columns side by side and normalise their format, then reopen the dialog.

An error says the relationship cannot be created. Excel is warning that it cannot prove one side holds unique values, or that the values do not match. Look for duplicates in the lookup table and for text-versus-number mismatches in the key columns.

The PivotTable shows blanks or empty totals. Some keys in the fact table have no match in the lookup table. Filter or clean orphans, or accept that they will land in a blank row.

The field list shows only one table. The PivotTable was built from the sheet, not the Data Model. Delete it and insert a fresh one with Add this data to the Data Model ticked.

The relationship disappeared after moving data. Tables stored in separate workbooks cannot be related directly. Copy the source table into the same workbook, or import both through Power Query into the model.

If that did not work, open Data > Relationships > Manage Data Model, review the line already defined, delete it and rebuild the link. Closing and reopening the workbook, and refreshing all data connections, clears a surprising number of stuck states. Clearing the relationship does not delete any of your source data.

Frequently Asked Questions

Do I need Power Pivot to make a relationship?

No. Modern Excel builds relationships through the Data Model for plain PivotTables. Power Pivot adds more modelling tools, but the basic Data > Relationships dialog is enough for linking two tables.

Can I link tables from two different workbooks?

Not directly. Both tables must sit in the same workbook for a relationship. Import the second table into the model with Power Query, which keeps a link to the source file and refreshes on demand.

Why does Excel say my column is not unique?

The column you chose as the one side contains repeated values. De-duplicate or aggregate the lookup table, or choose a different column that holds a unique key.

Does creating a relationship change my worksheets?

No. Relationships live in the Data Model, not in cells. Your tables stay exactly as they are, and no helper columns or lookup formulas are added.

Can I delete a relationship later?

Yes. Open Data > Relationships > Manage Data Model, select the relationship and remove it. Source data is untouched; only the link and any PivotTables relying on it are affected.

WhatsApp isn't relevant here, so what about dates?

Date keys are common and easy to get wrong. Make sure the date column is formatted as a date, not text, on both sides, and consider a dedicated Calendar table for flexible month and year reporting.