Excel Column Sort
Solved/Closed
Related:
- Excel Column Sort
- Excel date format dd.mm.yyyy - Guide
- How to sort bookmarks in chrome - Guide
- Spotify sort by genre - Guide
- Transfer data from one excel worksheet to another automatically - Guide
- Number to words in excel - Guide
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
Apr 19, 2009 at 08:01 AM
Hi,
Try with this macro, I hope it will work as you want :
Best regards
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