Excel Column Sort [Solved/Closed]

Report
-
 ZaQ -
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

2 replies

Posts
7083
Registration date
Saturday April 7, 2007
Status
Moderator
Last seen
September 25, 2020
477
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
Thank you

A few words of thanks would be greatly appreciated. Add comment

CCM 2942 users have said thank you to us this month

This worked perfectly, thank you greatly.

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!