Excel Tutorial: How To Match Two Columns In Excel


Matching two columns in Excel is an essential task for anyone working with spreadsheets. Whether you need to compare data sets, find duplicate entries, or identify missing information, the ability to match two columns is a valuable skill. In this tutorial, we will cover the steps to match two columns in Excel, allowing you to streamline your data analysis and improve the accuracy of your reports.

Key Takeaways

  • Matching two columns in Excel is essential for data analysis and report accuracy.
  • Understanding the data and identifying common fields is crucial before using any matching functions.
  • Using the VLOOKUP function and the INDEX and MATCH functions are effective ways to match two columns in Excel.
  • Handling errors and mismatches is an important part of the matching process, and techniques for resolving them should be utilized.
  • Combining data from matched columns using formulas and functions can create a consolidated dataset for further analysis.

Understanding the data

Before we can match two columns in Excel, it's important to understand the data that we are working with.

A. Assessing the data in the two columns

Take a close look at the data in the two columns that you want to match. Are they in the same format? Do they contain any errors or inconsistencies? Understanding the structure and content of the data will help you determine the best method for matching the columns.

B. Identifying the common field for matching

Identify the common field or key that exists in both columns and can be used as the basis for matching. This could be a unique identifier, such as a product code or customer ID, or it could be a combination of fields that together form a unique identifier.

Using the VLOOKUP function

When working with Excel, the VLOOKUP function is a powerful tool that allows you to search for a value in the first column of a table and return a value in the same row from another column. It is especially useful when you need to match data from two different columns.

Explanation of how the VLOOKUP function works

The VLOOKUP function works by looking for a specified value in the first column of a table and then returning a value in the same row from a specified column. It uses the following syntax:

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

  • lookup_value: the value you want to look up in the first column of the table
  • table_array: the range of cells that make up the table
  • col_index_num: the column number in the table from which to retrieve the value
  • range_lookup: an optional argument that can be either TRUE or FALSE. If TRUE or omitted, VLOOKUP will look for the closest match. If FALSE, it will look for an exact match.

Step-by-step guide on using VLOOKUP to match the two columns

Here's a step-by-step guide on how to use VLOOKUP to match the data in two columns:

  • Step 1: Arrange your data - Make sure that the data in both columns are in a format that can be easily compared. For example, if you are matching employee names, ensure that the names are spelled and formatted consistently in both columns.
  • Step 2: Insert a new column - Insert a new column next to the first column that you want to match. This is where the VLOOKUP formula and matched data will be displayed.
  • Step 3: Write the VLOOKUP formula - In the first cell of the new column, write the VLOOKUP formula using the syntax discussed earlier. For example, =VLOOKUP(A2, $F$2:$G$100, 2, FALSE) will look for the value in cell A2 in the range of cells F2 to G100 and return the value in the second column of the range.
  • Step 4: Apply the formula to the entire column - Once the formula is written in the first cell, apply it to the entire column by dragging the fill handle (the small square at the bottom-right corner of the selected cell) down to the end of the column.
  • Step 5: Review the matched data - Once the formula is applied, review the new column to see the matched data from the two columns. Any matching values will be displayed, while non-matching values will show #N/A.

Using the INDEX and MATCH functions

When it comes to matching two columns in Excel, the INDEX and MATCH functions offer a powerful and flexible approach. These functions are particularly useful when dealing with large datasets or when VLOOKUP may not be appropriate.

A. Explanation of the benefits of using INDEX and MATCH

1. Dynamic: INDEX and MATCH allow for dynamic lookups, meaning that the formula can adapt to changes in the dataset without needing to be manually updated.

2. Flexibility: Unlike VLOOKUP, INDEX and MATCH can handle left-to-right lookups and can search for values in any column, not just the first column.

3. Accuracy: These functions can be more accurate than VLOOKUP when dealing with unsorted or inconsistently formatted data.

B. Step-by-step guide on using INDEX and MATCH to match the two columns

1. Set up the data

Before using INDEX and MATCH, ensure that your data is well-organized and that you have identified the key columns you want to compare.

2. Write the formula

Create a cell where you want to display the matched value, then write the formula using the following structure: =INDEX(column_range_to_return, MATCH(lookup_value, lookup_column, 0))

3. Understanding the components

  • column_range_to_return: This is the range of cells where the result of the match will be found.
  • lookup_value: The value you want to find a match for.
  • lookup_column: The column where you want to search for the match.
  • 0: This indicates an exact match, which is the most common use case.

4. Apply the formula

Once the formula is written, press enter to apply it. The cell will display the matched value based on the criteria specified in the formula.

By following this step-by-step guide, you can effectively match two columns in Excel using the INDEX and MATCH functions, providing a dynamic and accurate solution for your data analysis needs.

Handling errors and mismatches

Matching two columns in Excel can sometimes result in errors and mismatches. It is important to identify and resolve these issues to ensure accuracy in your data analysis.

Identifying and resolving errors in the matching process

  • Ensure consistent formatting: Before matching two columns, ensure that the data in each column is formatted consistently. This includes checking for leading or trailing spaces, different date formats, or variations in text case.
  • Use error-checking functions: Excel offers built-in functions such as VLOOKUP, INDEX-MATCH, or conditional formatting to identify and highlight errors in the matching process. Utilize these functions to spot discrepancies in the data.
  • Manually review the data: In some cases, manually reviewing the data in each column can help identify errors that may have been missed by automated functions. Take the time to visually inspect the data for any inconsistencies.
  • Correcting errors: Once errors are identified, take the necessary steps to correct them. This may involve cleaning up the data, standardizing formats, or updating information to ensure accuracy.

Techniques for handling mismatches between the two columns

  • Use conditional formulas: Conditional formulas in Excel, such as IF or ISERROR, can be used to handle mismatches by providing alternative values or indicating the presence of an error.
  • Filter and sort: Utilize Excel's filtering and sorting capabilities to isolate and analyze mismatched data. This can help identify patterns or commonalities in the discrepancies.
  • Implement data validation: Set up data validation rules to prevent future mismatches. This can include restricting input options, setting data type requirements, or creating drop-down lists for standardized entries.
  • Communicate with data sources: If mismatches persist, consider reaching out to the sources of the data to clarify discrepancies or reconcile conflicting information. Clear communication can help resolve mismatches effectively.

Combining data from matched columns

When working with data in Excel, it is often necessary to match and combine information from two different columns. This can be useful for tasks such as data analysis, data consolidation, or creating new datasets based on related information.

Exploring options for combining data from matched columns

There are several options available for combining data from matched columns in Excel. These include using functions, formulas, and data manipulation techniques to bring together information from different sources.

  • VLOOKUP function: This function allows you to search for a value in the first column of a table and return a value in the same row from another column.
  • INDEX and MATCH functions: These functions can be used together to search for a value in one column and return a value from the same row in another column.
  • Concatenation: You can use the concatenation operator (&) to combine values from two columns into a single column.

Using formulas and functions to create a consolidated dataset

Once you have matched the columns and combined the data, you can use formulas and functions to create a consolidated dataset that brings together the relevant information in a single location.

  • SUM function: If your matched columns contain numerical data, you can use the SUM function to add up the values and create a total.
  • AVERAGE function: This function can be used to calculate the average of the values in the matched columns.
  • IF function: You can use the IF function to apply conditional logic and manipulate the data based on certain criteria.


Recap: Matching two columns in Excel is a crucial task for data analysis and management. It helps in finding and comparing data from different sources, which is essential for making informed decisions.

Encouragement: As you continue to enhance your Excel skills, remember to practice and explore other functions and features. Excel is a powerful tool that offers a wide range of capabilities, so take the time to familiarize yourself with them and improve your proficiency.

Excel Dashboard

ONLY $99

    Immediate Download

    MAC & PC Compatible

    Free Email Support

Related aticles