# How is VLOOKUP Used to Compare Two Columns in Excel?

This short and sweet Excel training session, I will reveal a very quick look at how you can compare two columns in Excel using the VLOOKUP function.

## How Can We Compare Two Columns in Excel?

In my online Excel classes, you’ll likely come to appreciate how important making accurate comparisons is. Here we have two sheets, one in green and one in blue, with a list of references in both.  In column B for sheet 1 we would like to find out if any of them appear on sheet 2.  We can do this with VLOOKUP, which checks for each reference we specify. Anything that isn’t found will return a result of #n/a, so we know that some are not found on that sheet.

The same principle applies to the sheet 2 below. So, let’s continue our Excel training by trying to compare two columns in Excel using VLOOKUP.

Immediately we can see that Apple, Pear and Passion Fruit appear in sheet 1 but not sheet 2. Equally, Avocado, Grapes and Melon appear in sheet 2 but not sheet 1.

A word of caution when doing this: If an extra space finds itself in the data (before or after the lookup value), it can give you an incorrect result. This is a point that will be reiterated numerous times during any quality course on Excel.

One way to take care of that is to use the trim formula as we have mentioned in our ‘what can go wrong with the VLOOKUP formula’ article. Or you can take some Excel for beginners courses to learn this function in greater detail.

## How Do I Use the Approximate Match Option Instead of Exact Match When I Want to Compare Two Columns in Excel?

When working with VLOOKUP, you should typically use the exact match, 0 or “false” for range_lookup, so why would you need an approximate match? This portion of your Excel training will teach you the more advanced features of the program and how, even when they seem unimportant, they can change your experience with Microsoft Excel. An approximate match is very useful for calculating a result from a series of data with tiered data, such as commission rates, exam grades and the like.  You can achieve the same with a nested “if” statement but that can get ridiculously messy if you have several tiered scores. VLOOKUP with approximate match makes quick work of this.

One very important thing about using approximate match is that in order for the function to work effectively, you must store your data (grading system in this case) in ascending order. We mentioned this at the very beginning of the article.  What approximate match will effectively do is to find the next largest value that is less than your lookup_value, so in our example it will find that 66 on row 6 is greater than our lookup_value, therefore it will revert to the previous figure above on row 5. In this case it’s 51, and the grade on that row = D.

And there you have it, a simple Excel tutorial on how to compare two columns using VLOOKUP.

## The Importance of Excel Training in Expanding your Knowledge

If you already know the simplest ways of achieving the basic desired goal you have in mind for your spreadsheet, that’s great! But with the help of my Excel training, you can reap the added benefits of learning the more complex solutions to these everyday Excel functions! And when you know more, you can do more. Once you understand the basic functions of VLOOKUP, you could very well be ready for more advanced Excel training courses.

2018-06-06T21:15:44+00:00Excel Training|