View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Patrick Molloy Patrick Molloy is offline
external usenet poster
 
Posts: 1,049
Default How can you flag a cell with fill colour

depends somewhat too on how you mean to 'flag' them....in this code i add a
new worksheet....

Option Explicit
Sub FlagColoredCells()
Dim ws As Worksheet 'for results
Dim cell As Range ' for find
Dim rowindex ' for results

For Each cell In ActiveSheet.UsedRange
If cell.Interior.ColorIndex < xlNone Then
If ws Is Nothing Then
Set ws = Worksheets.Add
rowindex = 1
End If
ws.Cells(rowindex, 1) = cell.Address
ws.Cells(rowindex, 2) = cell.Interior.ColorIndex
rowindex = rowindex + 1
End If
Next
End Sub


"birdnat" wrote in message
...
I am trying to write a formula that tells me if a cell is not white and
return a flag.