Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to write a formula that tells me if a cell is not white and
return a flag. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
you can use a worksheet function CELL
=cell("color",A1) returns 1 if the cell is formatted in color for negative values; otherwise returns 0 (zero). This function and Patrick's solution will not work if the cell is colored using conditional formating. "Patrick Molloy" wrote: 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
cell colour fill | Excel Discussion (Misc queries) | |||
How do I get more colour choices to fill a cell? | Excel Worksheet Functions | |||
Setting cell fill colour | Excel Programming | |||
Having a due date flag in a different colour 30 days from current. | Excel Worksheet Functions | |||
Changing Cell Fill Colour | Excel Discussion (Misc queries) |