cross reference between 2 sheets in same workbook


New Member
Feb 16, 2018
I work with audit rules that are being populated from a financial database (Concur) into an excel sheet. There are different rules being applied to different organizations.

I need to compare the overall data in sheet2 that has the names of the codes for the organization that are auto populated from Concur, to the list of audit rules in sheet1 (named AFP).

On sheet 2 I want to compare column A named "Name" and compare AFP column A with the "New Rule Title". I need to make sure that sheet 2 with the auto populated AFP auditing rules are not missing any other rules AFP should have from the AFP sheet.

(NOTE) I do have multiple organizations in these sheets and have filtered to AFP titles only.

How would I do this?


Board Regular
Jun 20, 2017
If I understand this correctly, you have two sheets, and you want to make sure that none of the entries in spreadsheet 1, column A, are missing in spreadsheet 2, column A?

You can do this with VLOOKUP. As the name indicates, VLOOKUP will "look up" a value from sheet 1 and see if it exists in sheet 2. If it does, the function returns the value. If it doesn't, the function returns #N/A.

Important: Sheet 2 must be sorted by the column you're looking up.

Put the VLOOKUP in the first empty column to the right of your data in sheet 1.

VLOOKUP has these arguments:
The value you are looking for (lookup_value)
The range of cells that make up the table (table_array)
The number of the column from which to retrieve a result (column_index)
The match mode (range_lookup, TRUE = approximate, FALSE = exact)

The lookup value, of course, is the value in sheet 1 you're going to lookup in sheet 2.
The table array is just the range you're going to search in sheet 2. You don't have to include the whole range. You can include just column A.
The column index is 1. The reason you can give different columns numbers is so you can search for something in one column, and return what's in a different column of the same row (for example, in a different application, you might search for a part number and return the part's price).
The match mode is FALSE because you want an exact match. This is why you have to sort sheet 2. Otherwise, VLOOKUP would give up as soon as the value in the search column was greater than the value you're searching for.

If you were looking for Charlie in this column, VLOOKUP would say no Charlie upon coming across David, because David is ahead of Charlie in the sort order.

Anyway, copy the VLOOKUP all the way down, and the cells with #N/A are the ones that are missing in sheet 2.

By the way, the table array argument will be an absolute range (e.g. $A$1:$A$50) because you're searching through the same range every time. If you don't make the range absolute, the search range will shift down every row.

You are now probably more confused than before, so here are a couple of links on VLOOKUP.

Forum statistics

Latest member

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...