- Excel For Mac Create Relationship Between Tables Free
- Excel For Mac Create Relationship Between Tables Function
- Excel For Mac Create Relationship Between Tables In Word
- Excel For Mac Create Relationship Between Tablespoon
- Excel For Mac Create Relationship Between Tables
When i insert a new pivot table, and point to an Access database, MS Query for Mac opens. I can select tables, but i cannot see how to create joins. If i return the data to Excel, there's no 'Relationships' button on the ribbon. Oct 30, 2017 Small tables and consistent field names between tables will help Auto-Detect to work. If you choose to Create the relationships yourself then the Create Relationship menu will open. Select the Orders table as the main Table. Select Customer ID as the Column (Foreign).
When starting to use Excel, we use formulas to manipulate data from other cells in the worksheet. After a while, however, this is no longer enough, as we need to combine data from multiple sheets, or even from other Workbooks.
In this article, we’ll tackle this issue and see how we can access the contents of any worksheet.
Formulas for Linking Data – An Example
Imagine that your supervisor in the fictitious WYZ Widget Company needs you to calculate how much of the assigned budget was actually used (you can find the file here).

Let’s look at the budget sheet (it’s the first in the workbook):
And compare it to the Actual Expenses sheet (the next one in the file):
Well, comparing it by eye just won’t do. We need a new table in which the difference is computed.
We’ll start with an empty table; that is, a table with the same headings for the columns and rows, but no data (available as the third sheet in the file):
In each cell of this table, we want to have the difference between the allocated budget and the actual spending. To do that, we’ll create a formula that deducts the amount of the second sheet (Expenses) from the first sheet (Budget).
To do this , we do the following:
- We select cell B5
- Type in ‘=’ (to start off the formula)
- Click on the Budget sheet tab to display the budget sheet; If you follow these steps you’ll note that the Formula Bar now contains =Budget! – this will be explained in a moment
- We’ll now click cell B5. The Formula Bar should now display =Budget!B5
- Type in – , which will be added to the Formula Bar: =Budget!B5-
- Click on the Actual Expenses sheet’s tab; The sheet’s name will be added to the Formula Bar: =Budget!B5-‘Actual Expenses’!
- Finally we’ll click on the B5 cell of this sheet and press the Enter key; the Difference sheet will be displayed again, and the B5 cell will display a zero amount
Here’s how it should look (check out the formula bar for the formula we created for cell B5):
Exclamation Points to Sheets

OK, what did we do here?
Let’s look at the formula we’ve created and explain the parts.
The first part of the formula we got from the Budget sheet:
Budget!B5
When we use a reference to a cell on the current sheet, we just type in the name (or select it using the mouse); when we want to refer to a cell in a different sheet in the same file, we preface it with the name of the sheet and an exclamation mark.
The second part, which we deduct from the first, is:
‘Actual Expenses’!B5
Excel For Mac Create Relationship Between Tables Free
So, now we have single quotes around the name. Why? Because the name includes a space. Any sheet name that contains a non-alphanumeric character needs to be quoted, so Excel won’t get confused.
Filling better
Now we can copy this formula to the rest of the cells in the table by using the fill handle.
Grab the fill handle and drag it down to cover the whole column. Excel is smart enough to replace the row numbers in each cell, so we get the difference between the appropriate entries in the two sheets:
You can also select the whole column and go on to fill the whole table by dragging the fill handle to the right up to the December column.
Summary
In this article, we learned how to reference data in other sheets, and that Excel’s fill handle is smart enough to work with those references. Will this technique be useful for you? Would you like to learn more about linking data between sheets? How about linking data between workbooks? Please share your thoughts in the comments…
About the Author: Joseph Reese is the founder of Excel-Formulas.com an Excel consulting firm. Head over to his website if you want to improve your performance with Excel.
May 04, 2018 - by Bill Jelen
Rick from New Jersey asks about setting up a slicer to control two pivot tables that come from two different data sets. I've solved this in the past using some VBA. But today, I think there is an easier way using the Data Model.
Controlling multipled pivot tables is one of the main benefits of slicers. But both of those pivot tables have to come from the same data set. When you have data from two different data sets, using one slicer to control both data sets becomes more difficult.
In order to use the technique in this article, your pivot tables must be based on a data model. If you have existing pivot tables that are not based on the data model, you need to delete them and start over.
Notes
If all of your pivot tables are based on the same data set, setting them up to use the same slicers is easier. Watch Episode 2011.
If you are using a Mac and don't have the Data Model, you might be able to solve the problem using VBA. Watch Episode 2104.
The key step is to build a new SlicerSource table. If both of your data sets contain a field called Sector and you want the pivot table to be based on Sector, copy the Sectors from both tables to a new table. Use Data, Remove Duplicates to create a unique list of the sectors found in either table.
When you create a pivot table from each of the two data sets, be sure to check the box for Add This Data to the Data Model.
When you insert a slicer, there will be two tabs across the top. Use the second tab - called All. Find the Slicer Source table and build the slicer from there.
Initially, only one pivot table will respond to the slicer. Select the other pivot table and choose Filter Connections.
Excel For Mac Create Relationship Between Tables Function
The result will be two pivot tables (from different data sets) that react to the slicer.
This method seems far easier than the VBA method described in video 2104.
Watch Video
Video Transcript
Learn Excel from MrExcel Podcast, Episode 2198: A Slicer for Two Data Sets.
Hey, welcome back to the MrExcel netcast, I'm Bill Jelen. I was in New Jersey doing a seminar there, and Rick asked a question, he said, 'Hey, look, I have pivot tables built on two different data sets and I'd like one slicer to be able to control those.' And now I did a video about this-- Episode 2104-- that used some VBA, but this video has really caused a lot of problems because people have slicers based on data that doesn't match. And so, you know, I wondered if there was an easier way to do this without the VBA.
And so, I have a table here on the left that has Sector, and I have a table on the right that has Sector. And if I have any existing pivot tables on these two data sets, I need to get rid of those pivot tables-- I need to just completely start over. And what we're going to do is we're going to build a third table that's going to live between the other two tables, and that table is just going to be really simple-- it's just going to be a list of all of the Sectors. So I take the Sectors from the left table, I take the Sector's from the right table, paste all of these together, and then choose the whole set, and under Data, choose Remove Duplicates-- right here-- and we end up with just the unique list of Sectors. Alright? Then we have to take each of these tables and make them into-- Format as Table using Ctrl+T, alright. So I take the left one, Ctrl+T; 'My table has headers', Yes; second one, Ctrl+T, 'My table has headers, Yes; third one, Ctrl+T, 'My table has headers'. Now Microsoft gives these really boring names, like 'Table 1', 'Table 2', and 'Table 3', and I'm going to rename those-- I'm going to call this left one Sales, I'm going to call the middle one my Slicer Source, and then this one over here I'll call Prospects. Alright.

So, I have the three tables and I need to somehow teach Excel that this table is related to both this table and this table over here. So we come to Relationships-- Data, Relationships, and I'm going to create a New Relationship from the Sales table. It has a field called Sector that's related to the Slicer Source-- Sector, click OK. Now create another Relationship from the right side, from the Prospect table-- it has a field called Sector, it's related to Slicer Source, the field called Sector, click OK.
So, now, I've taught Excel how what the relationship is, both from this one to the Slicer Source, and from this one to this Slicer Source. Now, at this point, I can build my two pivot tables. So I start here, Insert, PivotTable, make sure to check the box for 'Add this data to the Data Model, and we can build a nice report of Customer, and maybe Revenue-- like that. I want to see this high to low-- so Data, Z to A, and I want to narrow it down to just the top 5, or top 3, or something like that. Great, okay. Then, I want to build a second pivot table that's using the second data set. So, from here-- Insert, PivotTable, again make sure to 'Add this data to the Data Model', this time I'll put it on the same sheet, so we can kind of see how they are interacting with each other. Click OK. And we will get a unique count of prospects. It starts out with a count of prospects, but if I go into Field Settings, because I'm using the Data Model, I have an extra calculation here at the bottom called Count-- Distinct Count. Click OK, and we'll put the Sector here so we can see how many prospects there were in each of those Sectors. Okay, beautiful, that's all working great.
Now, what I want to do is insert a slicer, but the slicer's not going to be based on the Sales table, nor the Prospects table; that slicer is going to be based on the Slicer Source. Alright, so we choose a new slicer based on the Slicer Source, field is Sector, we get our slicer here, change the color if you'd like. Okay, so, just do a test here-- choose, for example, Consulting, and you see that this pivot table is updating but that pivot table is not updating. So from that pivot table, go to the PivotTable Tools-- Analyze, Filter Connections, and hook that pivot table up to the Sector Filter. And then as we choose, you see that this pivot table is updating, and that pivot table is updating as well. No VBA whatsoever.
Hey, be sure to check out my new book, MrExcel LIVe, The 54 Greatest Tips of All Time. Click that 'I' on the top right-hand corner for more information.
Today, Rick from New Jersey asked if one slicer can control pivot tables that come from multiple sources. And while I've done this in Episode 2104, with a VBA solution, we can do without VBA using the Data Model. That requires Windows, version of Excel-- Excel 2013 or newer-- and if you have any pivot tables that are not based on the Data Model, delete those, find the fields in common between your two data sets, copy each field to a new table, and use Remove Duplicates to get a unique list of that field. Now, you have three data sets-- the original data set, the other data set, and this new one. Make each one into a table using Ctrl+T; build a Relationship between the left data set and this new table; between the right data set and the new table; and then as you build your two pivot tables for each one, say 'Add this data to the Data Model'; when you build a slicer you have to click the All tab to see that third table; choose from the Slicer Source, that tiny little table; and then one of the two pivot tables is not going to be tied to the slicer; select a cell in that pivot table; use Filter Connections to connect the pivot table and the slicer.
To download the workbook from today's video, visit the URL in the YouTube description, and, you know, you can download the book.
Well, I want I thank you for stopping by, I'll see you next time for another netcast from MrExcel.
Excel For Mac Create Relationship Between Tables In Word
Download Excel File
To download the excel file: slicer-for-two-data-sets.xlsx
Excel For Mac Create Relationship Between Tablespoon
Excel Thought Of the Day
I've asked my Excel Master friends for their advice about Excel. Today's thought to ponder:
Excel For Mac Create Relationship Between Tables
'Excel neither belongs to any specific discipline, nor any talented people. It is a general software which could be useful for any discipline and anybody.'