Consulting

Results 1 to 2 of 2

Thread: Solved: Code To Compare Data in two sheets and highlight differences

  1. #1
    VBAX Regular
    Joined
    Jan 2011
    Posts
    18
    Location

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


    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?

  2. #2
    Mac Moderator VBAX Guru mikerickson's Avatar
    Joined
    May 2007
    Location
    Davis CA
    Posts
    2,778
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •