Color Code

A

Ali

If the cell is a value turn red if its a formula turn the
cell blue.

Thanks in advance for your help.
 
T

Tom Ogilvy

On Error Resume Next
cells.SpecialCells(xlformulas).Interior.ColorIndex = 8 ' or 5 for dark
blue
cells.SpecialCells(xlConstants).Interior.ColorIndex = 3
On Error goto 0
 
A

Ali

Thank Tom!
-----Original Message-----
On Error Resume Next
cells.SpecialCells(xlformulas).Interior.ColorIndex = 8 ' or 5 for dark
blue
cells.SpecialCells(xlConstants).Interior.ColorIndex = 3
On Error goto 0
--
Regards,
Tom Ogilvy






.
 
Top