Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Cell Function/Font Color
Is there a CELL Function that you can identify the color of a font with?
I would like part of a macro to make a decision based upon the color of the font in a particular cell. |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Cell Function/Font Color
Use font colorindex in your code.
Sub test_for_color() With ActiveCell.Font If .ColorIndex = 3 Then MsgBox "got it right" Else MsgBox "not right" End If End With End Sub You could set the code up with Select Case for varying colors. Gord Dibben MS Excel MVP On Wed, 12 May 2010 13:18:05 -0700, HpyTrvlr69 wrote: Is there a CELL Function that you can identify the color of a font with? I would like part of a macro to make a decision based upon the color of the font in a particular cell. |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Cell Function/Font Color
Thank you for your quick response. That worked like a charm.
Much Appreciated - HpY :) "Gord Dibben" wrote: Use font colorindex in your code. Sub test_for_color() With ActiveCell.Font If .ColorIndex = 3 Then MsgBox "got it right" Else MsgBox "not right" End If End With End Sub You could set the code up with Select Case for varying colors. Gord Dibben MS Excel MVP On Wed, 12 May 2010 13:18:05 -0700, HpyTrvlr69 wrote: Is there a CELL Function that you can identify the color of a font with? I would like part of a macro to make a decision based upon the color of the font in a particular cell. . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
add fill color or font color to if function | Excel Worksheet Functions | |||
Font Color Function | Excel Worksheet Functions | |||
Can I modify cell attributes (font,color etc.) based on function . | Excel Discussion (Misc queries) | |||
How to change the default Border, Font Color, and Cell Color | Excel Discussion (Misc queries) | |||
Default Border, Font Color, and Cell Background Color | Excel Discussion (Misc queries) |