Excel Column Sort

ZaQ - Apr 18, 2009 at 12:25 PM
 ZaQ - Apr 20, 2009 at 08:39 AM

i have a list of numbers/letters titles written like: 1KFLS921

there are around 2000 of these listed down column A.

i have the same list of titles written down column B but there are around 200 missing.

so both list contains the same titles, except 200 are missing out of column B. i need a conditional formatting or anything that will work, that will highlight the titles in column A that are NOT listed or Column B. or It could list the titles that are missing in a seperate column. either one works for me. Please Help.


2 replies

aquarelle Posts 7120 Registration date Saturday April 7, 2007 Status Anonymous Last seen April 14, 2023 490
Apr 19, 2009 at 08:01 AM
Try with this macro, I hope it will work as you want :
Sub CompareColumnsAB()
    Set cl2 = Range("A:A")
    Set cl1 = Range("B:B")
        For Each c In cl2
            MyValue = c.Value
            If MyValue <> "" Then
                Set Plage = cl1.Cells.Find(MyValue, lookat:=xlWhole)
                If Not Plage Is Nothing Then
                      c.Range("A1").Interior.ColorIndex = xlNone
                Else: c.Range("A1").Interior.ColorIndex = 4
                End If
            End If
End Sub

Best regards
This worked perfectly, thank you greatly.