How to join/ merge 2 worksheet tables using a 3rd table in Excel?

I need to join 2 tables into 1 combined table in Excel that summarises the data in 1 & 2. Table 3 is noted below as it describes the relationship between 1 and 2.

I have also described a combined table to describe what I would like final data set to look like.

Which Excel functions should be used to join these datasets together?

Table 1

|Campaign|Clicks|Spend|
|Campaign 1|1,000|$50.00|
|Campaign 2|50|$0.90|

Table 2

|Group|Revenue|
|Group 1|$75.00|
|Group 2|$2.50|
|Group 3|$1.00|

Table 3

|Group|Campaign|
|Group 1|Campaign 1|
|Group 2|Campaign 2|
|Group 3|Campaign 1|

Combined Table

|Campaign|Clicks|Spend|Revenue|
|Campaign 1|1,000|$50.00|$76.00|
|Campaign 2|50|$0.90|$2.50|

This problem pledges for the usage of some kind of database. Especially, if you may run into more complex data constallations in the future. Consider managing your data in Access and export / import to Excel, which should be supported quite well.

In SQL, your query would look something like this:

select campaign, clicks, spend, revenue from (
select campaign, sum(revenue) from 
    table2 inner join table3 on table2.group = table3.group group by campaign) as table23 
 inner join table1 on table1.campaign = table23.campaign

You can probably use the graphical MS Access editor, if you prefer that.


Based on your example data, I'm assuming each group will only ever belong to one campaign. If that is the case, then this can be done quite easily in Excel with the VLOOKUP and SUMMIF formulas and some named ranges.

Picture of tables in Excel

  1. Select all of Table 3 and name it.
  2. Add a Campaign column to Table 2. and use the VLOOKUP formula to find the Campaign. If the tables are setup as in my picture, then the formula in cell H3 would be: =VLOOKUP(F3,Table3,2,FALSE).
  3. Select the Table 2 Revenue column and name it.
  4. Select the new Table 2 Campaign column and name it.
  5. Add a Revenue column to Table 1. Use the SUMIF formula to total the revenue in Table 2. In my example, the formula in cell D3 is: =SUMIF(Table2_Campaign,A3,Table2_Revenue).

Since the only difference between your Combined Table and Table 1 was the Revenue column, I just added it to Table 1.