Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You could get all the cells at once, too:
Option Explicit Sub ColorFormulas2() Dim rng As Range set rng = nothing on error resume next 'just in case there are no formulas Set rng = Cells.SpecialCells(xlCellTypeFormulas) on error goto 0 if rng is nothing then 'do nothing else rng.Interior.Color = vbYellow end if End Sub Ron Rosenfeld wrote: On Sun, 27 Jan 2008 09:37:27 -0800 (PST), wrote: is it possible to change the color of all cells that contain a formula or are part of a formula??? if so, how would i do that? You could use a macro. Run the macro below when the Sheet you wish to modify is active: ======================= Option Explicit Sub ColorFormulas() Dim c As Range Dim rng As Range Set rng = Cells.SpecialCells(xlCellTypeFormulas) For Each c In rng c.Interior.Color = vbYellow Next c End Sub ====================== --ron -- Dave Peterson |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Change the color of cells having formula. | Excel Discussion (Misc queries) | |||
Change part of formula | Excel Worksheet Functions | |||
Change font and background color of several cells based on result of a formula | Excel Discussion (Misc queries) | |||
can I use the 'fill color' as part of a formula | Excel Discussion (Misc queries) | |||
Keeping one part of a formula same, but change other cell ref? | Excel Discussion (Misc queries) |