+ Reply to Thread
Results 1 to 8 of 8

Compare columns in different worksheets nad highlight differences

Hybrid View

  1. #1
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,551

    Re: Compare columns in different worksheets nad highlight differences

    Untested, give this a try

    Sub FindEmail()
    Const shLarge As String = "Sheet1"    '<=== big spreadsheet sheet name. Change for you needs
    Const shOther As String = "Sheet2"    '<=== small spreadsheet sheet name. Change for you needs
    Dim FoundCell As Range, rng As Range, c As Range
    
        With Worksheets(shLarge)
            Set rng = .Range("c2", .Cells(Rows.Count, "c").End(xlUp))
            For Each c In rng
                Set FoundCell = Worksheets(shOther).Range("F:F").Find(What:=c.value, LookAt:=xlWhole)
                
                If FoundCell Is Nothing Then
                    c.Interior.Color = vbYellow
                End If
            Next
        End With
        
    End Sub
    Last edited by mike7952; 10-10-2012 at 04:13 PM.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1