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






.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top