View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Gary Adamson[_2_] Gary Adamson[_2_] is offline
external usenet poster
 
Posts: 4
Default Selecting cells by color?

Is there a way to select cells based on color?
Do I need to do this with a program or does Excel have a
function to do this?


Sub FindSameCells()
ci = ActiveCell.Interior.ColorIndex
For Each c In ActiveSheet.UsedRange
If c.Interior.ColorIndex = ci Then
'Add this cell to the SelectionRange
end if
Next c
SelectionRange.Select
End Sub