Mega Code Archive

 
Categories / VisualBasic Script / Excel
 

To find records that have a particular fill color, use an operator of xlFilterCellColor and specify a particular RGB value as the cr

Sub FilterByFillColor()     Worksheets("SalesReport").Select     Range("A1").AutoFilter     Range("A1").AutoFilter Field:=6, Criteria1:=RGB(255, 0, 0), Operator:=xlFilterCellColor End Sub