PDA

View Full Version : Solved: Code To Compare Data in two sheets and highlight differences



xlUser
01-19-2011, 07:50 AM
Hi

I have data in two sheets (sheet1, sheet2). I would like to compare values in column A between sheets and find all rows that there is no match based on column A

However, the number of rows between the sheets differ and the data is not arranged in the same order. So I need to compare the first populated value in sheet 2 (“a2”) against all rows populated in column A to see if there is match and if not highlight that row in sheet 2 and then do the same with a3, a4 etc.

End Sub

Is this possible to do?

mikerickson
01-19-2011, 08:18 AM
If use a helper column, on Sheet2, with
=ISNUMBER(MATCH(Sheet2!$A2, Sheet1!$A:$A, 0)

That will give you TRUE/FALSE if the data in column A is also in Sheet1 column A.