Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
The macro highlights cells and the user wants to sort or filter on the
highlighted rows so they can be deleted. Here's the macro. Sub finddiff() Application.ScreenUpdating = False Range("A2", Range("b6900").End(xlUp)).ClearFormats For Each x In Range("a2", Range("a6900").End(xlUp)) For Each y In Range("b2", Range("b6900").End(xlUp)) If x.Value = y.Value Then z = 1 Next If z < 1 Then x.Interior.ColorIndex = 6 z = 0 Next For Each s In Range("b2", Range("b6900").End(xlUp)) For Each t In Range("a2", Range("a6900").End(xlUp)) If s.Value = t.Value Then v = 1 Next If v < 1 Then s.Interior.ColorIndex = 6 v = 0 Next End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Filter, sort and sum | Excel Discussion (Misc queries) | |||
Sort column by formula result | Excel Discussion (Misc queries) | |||
data sort/filter | Excel Worksheet Functions | |||
Filter and sort | Excel Discussion (Misc queries) | |||
sort data with the same result | Excel Worksheet Functions |