Comparing two columns in Microsoft Excel

I'm attempting to compare two columns of data. One column (column G) is a "master" list with all account numbers in it and the other column (column A) only has a partial list of account numbers.

I'm looking for a formula that will compare the two columns and return a true if found in both columns or a false if only found in one.


Solution 1:

You are probably going to want some variant of VLOOKUP to get this done. The trick is that you want your VLOOKUP to return a true or false. My method for getting a true/false from VLOOKUP is this:

=IFERROR(VLOOKUP(lookup_value,lookup_range,index,FALSE)>0,FALSE)

this returns true if it finds a value, and false if it doesn't. (if someone knows a better way to do this, I'd love to know it!)

So now you put one of those statements for each of your columns inside an AND statement & you should have your test!

=AND(lookup test1,lookup_test2)

That was kinda long, but I hope it helps!