Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default compare pairs of columns

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 143
Default compare pairs of columns

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.



"rebecca" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default compare pairs of columns

On May 8, 3:01*pm, PJFry wrote:
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.



"rebecca" wrote:
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- Hide quoted text -


- Show quoted text -


Worked great -- thank you PJ!
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 143
Default compare pairs of columns

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.



"rebecca" wrote:

On May 8, 3:01 pm, PJFry wrote:
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.



"rebecca" wrote:
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- Hide quoted text -


- Show quoted text -


Worked great -- thank you PJ!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Comparing pairs of cells in four columns brents18 Excel Discussion (Misc queries) 7 July 3rd 07 04:10 PM
Sum product of many pairs of columns KeenKiwi Excel Worksheet Functions 3 May 11th 06 12:59 PM
merge pairs of columns mpreddy[_5_] Excel Programming 0 April 25th 06 11:51 AM
Removing Duplicate Pairs(2 Columns) deathswan Excel Discussion (Misc queries) 3 April 1st 06 05:01 AM
Remove Duplicate Pairs(2 Columns) deathswan Excel Programming 2 April 1st 06 01:21 AM


All times are GMT +1. The time now is 06:51 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"