Excel Column Sort

Solved/Closed
ZaQ - Apr 18, 2009 at 12:25 PM
 ZaQ - Apr 20, 2009 at 08:39 AM
Hello,

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.


zH
Related:

2 responses

aquarelle Posts 7140 Registration date Saturday April 7, 2007 Status Moderator Last seen March 25, 2024 491
Apr 19, 2009 at 08:01 AM
Hi,
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
        Next
End Sub


Best regards
3
This worked perfectly, thank you greatly.
1