Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Is there a way to use the color of a cell in an IF statement?
|
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi
since you post in programming, i assume you are looking for a code solution and not a formula solution. Sub JeffBIfColor() If Range("G4").Interior.ColorIndex = 3 Then 'red MsgBox "it's red" Else MsgBox "it's not red" End If End Sub regards FSt1 "Jeff-B" wrote: Is there a way to use the color of a cell in an IF statement? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you so much I will give it a try. I didn't think a formula solution
was possible so I thought I would have go the programming route. Is there an easy formula solution? "FSt1" wrote: hi since you post in programming, i assume you are looking for a code solution and not a formula solution. Sub JeffBIfColor() If Range("G4").Interior.ColorIndex = 3 Then 'red MsgBox "it's red" Else MsgBox "it's not red" End If End Sub regards FSt1 "Jeff-B" wrote: Is there a way to use the color of a cell in an IF statement? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
There is no formula solution using Excel's built-in functions.
If the color is due to Conditional Formatting you could use the IF function based upion the condition. Elsewise you need a macro or a UDF Gord Dibben MS Excel MVP On Sat, 16 Aug 2008 15:47:00 -0700, Jeff-B wrote: Thank you so much I will give it a try. I didn't think a formula solution was possible so I thought I would have go the programming route. Is there an easy formula solution? "FSt1" wrote: hi since you post in programming, i assume you are looking for a code solution and not a formula solution. Sub JeffBIfColor() If Range("G4").Interior.ColorIndex = 3 Then 'red MsgBox "it's red" Else MsgBox "it's not red" End If End Sub regards FSt1 "Jeff-B" wrote: Is there a way to use the color of a cell in an IF statement? |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
See http://xldynamic.com/source/xld.ColourCounter.html
-- __________________________________ HTH Bob "Jeff-B" wrote in message ... Is there a way to use the color of a cell in an IF statement? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Powerpoint / Excel: custom pp RGB color doesn't match identical Excelcustom RGB color | Charts and Charting in Excel | |||
Can't format cell color/text color in Office Excel 2003 in fil | Excel Discussion (Misc queries) | |||
change fill color of a range of cells based on color of a cell? | Excel Programming | |||
Can't format cell color/text color in Office Excel 2003 in files . | Excel Discussion (Misc queries) | |||
Browse Forms Controls and change TextBox color based on cell color | Excel Programming |