Excel Tutorial: How Do I Merge Two Excel Spreadsheets By Matching Data


Are you struggling with merging two Excel spreadsheets? Excel is a powerful tool for managing data, and being able to merge two spreadsheets is a valuable skill. When merging two spreadsheets, it is crucial to match data accurately to avoid errors and inconsistencies. In this tutorial, we will provide a brief overview of the process and explain the importance of matching data when merging Excel spreadsheets.

A. Explanation of merging two Excel spreadsheets

B. Importance of matching data when merging

C. Brief overview of the process

Key Takeaways

  • Matching data accurately is crucial to avoid errors and inconsistencies when merging Excel spreadsheets.
  • Preparing your Excel spreadsheets by ensuring a common key, removing blank rows, and saving backups is essential for a smooth merging process.
  • VLOOKUP and INDEX/MATCH are powerful functions for matching and merging data, and understanding their syntax and parameters is key.
  • After merging, it's important to remove duplicate rows and double-check the accuracy and completeness of the merged data.
  • Exploring advanced merging options with Power Query can provide additional benefits for combining data from multiple sources.

Step 1: Prepare your Excel spreadsheets

Before merging two Excel spreadsheets, it's important to ensure that both files are properly prepared for the process. Here are the key steps to take:

  • Ensure both spreadsheets have a common key to match data
  • Before merging the data, it's essential to have a common key that can be used to match the data between the two spreadsheets. This could be a unique identifier such as an ID number or a specific name that appears in both spreadsheets.

  • Remove any blank rows or columns that could interfere with the merging process
  • Blank rows or columns in the Excel spreadsheets can cause issues during the merging process. It's important to go through both spreadsheets and remove any unnecessary blank rows or columns to ensure a smooth merging process.

  • Save a backup of your original spreadsheets in case of errors
  • Before proceeding with the merging process, it's a good practice to save a backup copy of the original spreadsheets. This provides a safety net in case any errors occur during the merging process, allowing you to revert to the original data if needed.

Step 2: Use VLOOKUP to match and merge data

Once you have both spreadsheets open and ready, you can begin the process of matching and merging the data using the VLOOKUP function.

  • A. Open a new Excel sheet where you want to merge the data
  • Start by opening a new Excel sheet where you want to consolidate the data from the two separate spreadsheets. This will be the destination sheet where the merged data will be displayed.

  • B. Use the VLOOKUP function to match data from one spreadsheet to the other
  • Next, you'll use the VLOOKUP function to search for a value in one spreadsheet (the source) and return a corresponding value from another spreadsheet (the destination). This will allow you to match and merge the data based on a common identifier, such as a unique ID or product code.

  • C. Understand the syntax and parameters of the VLOOKUP function
  • It's important to understand the syntax and parameters of the VLOOKUP function in order to use it effectively. The basic syntax of the VLOOKUP function is as follows:

    VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])


    • lookup_value is the value you want to search for in the source spreadsheet.
    • table_array is the range of cells that contains the data you want to match and merge.
    • col_index_num is the column number in the table_array that contains the value to be returned.
    • range_lookup is an optional parameter that specifies whether you want an exact match or an approximate match. This is typically set to FALSE for an exact match.

Step 3: Use INDEX and MATCH for more complex merging

When dealing with more complex merging tasks in Excel, you may find that the VLOOKUP function is not sufficient. In such cases, the combination of INDEX and MATCH functions can be more effective in merging two excel spreadsheets by matching data.

A. Understand when to use INDEX and MATCH instead of VLOOKUP
  • 1. Multiple criteria:

    INDEX and MATCH can handle multiple criteria more efficiently than VLOOKUP. If you need to match data based on more than one condition, INDEX and MATCH are the way to go.
  • 2. Lookup array:

    Unlike VLOOKUP, which only searches from left to right, INDEX and MATCH can search in any direction, making them more versatile for complex data structures.
  • 3. Exact match:

    INDEX and MATCH can perform an exact match, while VLOOKUP is limited to approximate matching.

B. Learn how to write the formula using INDEX and MATCH

Writing a formula with INDEX and MATCH involves using the INDEX function to retrieve a value from a specific row or column within a range, and the MATCH function to determine the position of a value within a range.

The basic syntax for the formula is: =INDEX(return_range, MATCH(lookup_value, lookup_range, 0))


  • return_range is the range of cells from which you want to return a value.
  • lookup_value is the value you want to find in the lookup_range.
  • lookup_range is the range of cells that contains the value you want to match.
  • 0 represents an exact match. You can also use 1 for approximate match.

C. Test your formula to ensure accurate merging of the data

After writing the formula using INDEX and MATCH, it is crucial to test it to ensure that it accurately merges the data from the two excel spreadsheets. You can do this by comparing the merged result with the original data and verifying that the values are matching as expected.

Step 4: Remove duplicate rows after merging

After merging two excel spreadsheets, it's important to remove any duplicate rows to ensure data accuracy and consistency. Here are the steps to remove duplicate rows:

A. Use the Remove Duplicates feature in Excel
  • B. Select the key columns to identify and remove duplicate rows

Identify the key columns in your merged data that you want to use to identify and remove duplicate rows. These key columns will help Excel determine which rows are duplicates and should be removed.

C. Double-check your merged data for accuracy and completeness

Once you have removed duplicate rows, it's important to double-check your merged data to ensure that the process didn't inadvertently remove any necessary information. Take the time to review the data for accuracy and completeness.

Step 5: Use Power Query for advanced merging options

When it comes to merging data from multiple Excel spreadsheets, Power Query offers advanced features that can streamline the process and provide more flexibility in how you combine your data. Here's what you need to know about using Power Query for merging Excel spreadsheets.

A. Explore the advanced features of Power Query for merging data
  • Power Query provides a wide range of advanced features for merging data, including the ability to perform complex transformations, clean and reshape data, and handle various data types.
  • With Power Query, you can easily handle large datasets, manage data from different sources, and perform advanced transformations to prepare your data for merging.

B. Learn how to append, merge, and combine data from multiple sources
  • Power Query allows you to append data from multiple Excel spreadsheets, combining the rows from different tables into one consolidated table.
  • You can also merge data by matching key columns, combining related data from different sources into a single table.
  • Additionally, Power Query enables you to combine data from various sources, such as databases, text files, and web pages, providing a comprehensive solution for merging data from diverse sources.

C. Understand the benefits of using Power Query for merging Excel spreadsheets
  • Using Power Query for merging Excel spreadsheets offers several benefits, including the ability to automate the process of merging data, saving time and effort.
  • Power Query provides a user-friendly interface for merging data, making it easier for users to perform complex merging operations without needing advanced technical skills.
  • By leveraging the advanced features of Power Query, you can ensure the accuracy and consistency of your merged data, reducing the risk of errors and ensuring high-quality results.


In conclusion, merging Excel spreadsheets by matching data is a crucial step in maintaining data integrity and accuracy. As highlighted earlier, it is important to ensure that the correct data is brought together to avoid errors in analysis and decision-making. We encourage you to practice and experiment with different merging techniques to find the method that works best for your specific data sets. Always remember to maintain data integrity throughout the merging process for reliable and meaningful results.

Excel Dashboard

ONLY $99

    Immediate Download

    MAC & PC Compatible

    Free Email Support

Related aticles