![]() |
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 |
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 |
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! |
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! |
All times are GMT +1. The time now is 12:54 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com