Prev: Zero and Null Sum Function
Next: Ziping excel 2007?
From: HpyTrvlr69 on 12 May 2010 16:18 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.
From: Gord Dibben on 12 May 2010 17:22 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 <HpyTrvlr69(a)discussions.microsoft.com> 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.
From: HpyTrvlr69 on 12 May 2010 18:08 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 > <HpyTrvlr69(a)discussions.microsoft.com> 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. > > . >
|
Pages: 1 Prev: Zero and Null Sum Function Next: Ziping excel 2007? |