Learn how to create Excel dashboards.

Categories

30 Excel Functions in 30 Days

 

Archives

Create Table Combinations With MS Query

What's a quick way to combine the items in two table? For example:

  • Table A has 3 items – Sugar, Coffee and Milk.
  • Table B has 2 items – Cans and Sticks.

How can you create a third table that has all the Table 1 items combined with each of the Table 2 items?

  • Sugar – Cans, Sugar – Sticks, etc.

cartesianjoin00

Use MS Query

I've done this with programming before, but this time I used Microsoft Query, to do the work for me.

Add the two tables to the query, with no join line between them, and the results show each item in table 1 connected to each item in table 2.

cartesianjoin07

Read the Details

To see the details for setting this up, and refreshing the results table, please visit the Cartesian Join in Excel Using MS Query page on my Contextures website.

It shows all the steps for creating the query, sending the results to Excel, and refreshing the table if the source data changes.

_____________________

Related Posts Plugin for WordPress, Blogger...

3 comments to Create Table Combinations With MS Query

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>