compare pairs of columns

R

rebecca

I need to compare employee information between 2 lists and spit out
mismatches.

So, for instance, I have a spreadsheet with a column of employee IDs.
The second column is the employee department numbers. We know the
information on this spreadsheet is accurate.

There's a second spreadsheet with the same columns, however we need to
check this spreadsheet against the first because we aren't sure it's
correct.

So I need a function that will look at cell A1 in the first
spreadsheet, find the corresponding row in the second spreadsheet and
compare the corresponding department number values to see if they're
the same.

I think this is a combination of VLOOKUP and IF functions, I just
can't figure out how to refer to the row numbers.

Any ideas?

Thanks

Rebecca
 
P

PJFry

Just to make sure I am understanding correctly:

You have two spreadsheets. Both have two columns, name and department. The
first spreadsheet contains the correct name-department list. The second
spreadsheet is questionable. You want to find a value from the first
spreadsheet on the second spreadsheet and see if the corresponding
departments match.

Assuming the Name is the column A, the department is in column B, put this
formula in column C:
=IF(VLOOKUP(A2,Second Spreadsheet A:B,2,0)=B2,"Match","Error")

So you are looking up the name from the first spreadsheet (A2) on the second
spreadsheet and pulling back the second column (department) from the second
spreadsheet and comparing it to the department on the first spreadsheet
(=B2). If they match, Match, if not Error.

That got a little wordy... post back and let us know how it turned out...
 
R

rebecca

Just to make sure I am understanding correctly:

You have two spreadsheets.  Both have two columns, name and department. The
first spreadsheet contains the correct name-department list.  The second
spreadsheet is questionable.  You want to find a value from the first
spreadsheet on the second spreadsheet and see if the corresponding
departments match.  

Assuming the Name is the column A, the department is in column B, put this
formula in column C:
=IF(VLOOKUP(A2,Second Spreadsheet A:B,2,0)=B2,"Match","Error")

So you are looking up the name from the first spreadsheet (A2) on the second
spreadsheet and pulling back the second column (department) from the second
spreadsheet and comparing it to the department on the first spreadsheet
(=B2).  If they match, Match, if not Error.

That got a little wordy... post back and let us know how it turned out...

--
Regards,

PJ
Please rate this post using the vote buttons if it was helpful.










- Show quoted text -

Worked great -- thank you PJ!
 
P

PJFry

No problem.

There should be a 'Did this answer your question' button at the bottom of
your form. Go ahead and click 'Yes'.
--
Regards,

PJ
Please rate this post using the vote buttons if it was helpful.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top