How to Inner Join in Excel (2 Easy Methods)

An inner join is one of the join types offered in Power Query’s Merge dialog box. An inner join only pulls matched rows of both tables. In this article, we are going to demonstrate to you two quick ways to inner join in Excel. If you are also curious about it, download our practice workbook and follow us.


Inner Join in Excel: 2 Quick Methods

To demonstrate the approaches, we consider two tables of examination marks. In both tables, we displayed the marks of math and physics with their ID.

Dataset Overview

Note

All the operations of this article are accomplished by using Microsoft Office 365 application.


1. Applying VLOOKUP Function to Inner Join in Excel

In the first method, we are going to use the VLOOKUP function to inner join both tables in Excel. We will export the data according to our ID. The steps of this process are given below:

📌 Steps:

  • First of all, in a new sheet, store all the IDs in the range of cells B5:B14.
  • Now, select cell C5 and write down the following formula in the cell.

=VLOOKUP(B5,Dataset!$B$5:$C$14,2,FALSE)

  • Hence, press Enter.

Using VLOOKUP function to get the math marks to inner join

  • Similarly, select cell D5 and write down the following formula inside the cell.

=VLOOKUP(B5,Dataset!$E$5:$F$14,2,FALSE)

  • After that, again, press Enter.

Use of VLOOKUP function to get the physics marks to inner join in Excel

  • Further, select the range of cells C5:D5 and drag the AutoFill Handle icon to copy the formula up to cell D14.

  • Finally, you will get your desired output.

Applying VLOOKUP Function to Inner Join in Excel

Thus. we can say that our formula works perfectly, and we are able to apply inner join to our table in Excel.


2. Using Power Query Feature to Inner Join in Excel

In the second method, we will use the Power Query feature of Excel to inner join our data tables. The procedure of this method is explained below step-by-step:

📌 Steps:

  • At first, select the range of cells B4:C14.
  • Now, in the Data tab, click on the From Table/Range option from the Get & Transform group.

Opening From Table/Range option to inner join

  • As a result, a small dialog box titled Create Table will appear.
  • Here, check the My table has header option and click OK.

  • Hence, the Power Query Editor will appear.
  • Then, in the Home tab, click on the drop-down arrow of the Close & Load command and choose the Close & Load To option.

Create connection in Table

  • Another dialog box called Import Data will appear.
  • After that, choose the Only Create Connection option and click OK.

Choosing suitable option for the connection

  • Similarly, follow the same procedure for the second table to create a connection.

  • Next, in the Data tab, click on the drop-down arrow of the Get Data option and choose the Combine Queries > Merge option.

launching Merge dialog box to inner join to table in Excel

  • As a result, the Merge dialog box will come in front of you.
  • Now, from the upper field, click on the drop-down arrow and select Table1.
  • Hence, click on the ID column.

  • Similarly, follow the same procedure in the lower field.
  • At last, in the Join Kind section as the Inner (only match rows) option.
  • Finally, click OK.

  • The Power Query Editor table will appear again.
  • Afterward, click on the expand icon in the heading of Table2.

Click on Expand icon to inner join in Excel

  • Next, uncheck the ID option and click OK.

  • At last, from the Home tab, click on the Close & Load option.

  • You will see a new sheet will open, and it will show the joined table.

Using Power Query Feature to Inner Join in Excel

So, we can say that our procedure works successfully, and we are able to inner join in Excel.

Note

Now, you may be curious to know how to outer join in Excel. The procedure of performing outer join is almost similar to the method mentioned above. You have to just choose a different option in the Join Kind section. Instead of the Inner (only match rows) option, you have to choose the Full Outer (all rows from both) option.

Read More: How to Combine Two Tables Using Power Query in Excel


How to Apply Left Join in Excel

Here, we will also show you the procedure of left join in Excel. The VLOOKUP function will help us to perform left join both tables in Excel. Our dataset is in the range of cells B5:G14.

The steps of this method are given as follows:

📌 Steps:

  • First, in a new sheet, store the first table in the range of cells B5:C14.
  • After that, select cell D5 and write down the following formula in the cell.

=VLOOKUP('Left Join'!B5,Left!$E$5:$G$14,{2,3},FALSE)

  • Then, press Enter.

Utilizing VLOOKUP function to left inner in Excel

  • Now, drag the AutoFill Handle icon to copy the formula up to cell D14.

Using AutoFill Handle icon to copy formula

  • You will be able to left join in Excel.

Perform Left Join in Excel

Therefore, we can say that our formula works accurately, and we are able to perform the left join in Excel.


Download Practice Workbook

Download this practice workbook for practice while you are reading this article.


Conclusion

That’s the end of this article. I hope that this article will be helpful for you and you will be able to inner join in Excel. Please share any further queries or recommendations with us in the comments section below if you have any further questions or recommendations.


Related Articles


<< Go Back to Power Query Joins | Power Query Excel | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Soumik Dutta
Soumik Dutta

Soumik Dutta, having earned a BSc in Naval Architecture & Engineering from Bangladesh University of Engineering and Technology, plays a key role as an Excel & VBA Content Developer at ExcelDemy. Driven by a profound passion for research and innovation, he actively immerses himself in Excel. In his role, Soumik not only skillfully addresses complex challenges but also demonstrates enthusiasm and expertise in gracefully navigating tough situations, underscoring his unwavering commitment to consistently deliver exceptional, high-quality content that... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo