Conditional Formatting

S

SidBord

I'm not sure what you are doing. Is the cell blank
initially, then you type a formula into it? Do you know
how to use conditional formatting? Just invoke conditional
formatting, then add a formula in the formula box that will
be something like: =A1 <> ""
assumming the cell is "A1". This says, if the cell is not
null, then do the formatting I show in the formatting boxes
below. Then in the formatting box set the pattern color
to, say, red. Press OK. Then whenever you put anything
in the cell A1, the background color will turn red. I
always modify the font to be black and bold when I use a
red background.
-----Original Message-----
When I have a formula entered in a cell I want the back
ground to change to a color. How do I do that with
conditional formatting or is there a different way?
 
T

Tom K

I know how to do it for a specific reason e.g. something over or under 50%, 1000 or whatever. I need to know how to do it for just a formula.

I want to open the spreadsheet and have every single cell that has a formula in it to have a grey background, not because it's over a certain percentage or dollar amount. Just because it has a formula.

My criteria is...if it has a formula change the cell to grey.

Sounds simple but sometime it's the simpleist thing that can stump you.
 
C

Cutter

How about this

Edit/Go to/Special/Click on formulas/OK
Every cell containing a formula is now selected.
Then format.

You could have a macro do this if you need it to be done on an ongoin
basis
 
G

Gord Dibben

Tom

Place this code in your ThisWorkbook module.

Private Sub Workbook_Open()
Dim cel As Range
Dim ws as Worksheet
For Each cel In ActiveSheet.UsedRange
If cel.HasFormula = True Then
cel.Interior.ColorIndex = 15 'or 24 or 34
End If
Next cel
End Sub

Gord Dibben Excel MVP
 
Top