Comparing Excel Sheets for Sanity and Such Things
February 1, 2012 11:10 AM Subscribe
ExcelFilter: Compare rows for data changes? I want to find out whether row values are different between two sheets on records that match.
MetaFilter, please help me achieve the "Hmm, it should be possible". I want to find a way to determine whether values in a row change between two different sheets. However, the sheets are not fixed -- the rows change order and add new records. The two sheets have the same column values, but possibly have different rows.
I have two excel files that I receive weekly from two of our systems. It's a roster that contains people and attributes that may change. For example:
UID | First | Last | Status | Location | Room
222 | John | Smith | Pending | EBW | 2
(Fictional data to protect the innocent!)
I generally want to figure out:
1. Who is missing from one sheet against the other.
2. For the records that match, if there's any changes in the field values.
Number 2 is what I need help with, number 1 is already done. I can determine records that are missing from either of the sheets, by using a formula to search for the UIDs. In case anyone is interested, this is what I'm doing in the first sheet: =IF(ISERROR(MATCH($C2,$Sheet2!$C$2:$C$2997,0)),"No","Yes (" & MATCH($C2,$Sheet2!$C$2:$C$2997,0) & ")") -- that returns Yes if it's found in the second sheet, and no if it isn't.
Now I'm trying to discover the differences in data, due to errors in our system or syncing problems. So, one sheet may say:
UID | First | Last | Status | Location | Room
222 | John | Smith | Pending | EBW | 2
and the other
UID | First | Last | Status | Location | Room
222 | John | Smith | Closed | CDL | 1
Any ideas, Mefites? Perhaps some macro magic? I've been running against a brick wall on searches -- I haven't found anything that's trying to do this with two sheets that have the same columns, but different rows.
posted by kensch to computers & internet (6 answers total) 1 user marked this as a favorite
So, with simpler columns -- A has UID, B has first, C has last, I might put the following in D:
=if(isna(vlookup(A2,[other sheet],2,false)),"N/A",if(B2=vlookup(A2,[other sheet],2,false),"okay","check"))
You could also just put the vlookup data in columns D and E, then in F and G put TRUE or FALSE depending on B=D, C=E, respectively. Then you can just autosort for false. (You can even put =AND(F2,G2) in H2, and then autosort there.)
posted by jeather at 11:20 AM on February 1, 2012