color cells with formulas

Joanna_gr

Board Regular
Joined
Feb 16, 2002
Messages
149
Hi again!

I want to apply special formatting to cells that contain formulas.
I think u've already answered this but i don't know where to locate the answer. Can u please help me?
Thanx
 
thank u all for ur help and Autolycus thanx for ur remark. :smile:

On 2002-02-26 06:29, Autolycus wrote:
I would not recommend using this method of identifying cells with formulas.
Cells that have this conditional formatting cannot be copied and pasted to other worksheets and attempting to do so might cause Excel to crash.

I use these macros to identify formulas and to remove the identification :-


Sub IdentifyFormulae_Add()
Dim ws As Worksheet
For Each ws In ActiveWindow.SelectedSheets
With ws.UsedRange
'Remove cell highlights (in case there _
are any cells highlighted but without _
formulae)
.Interior.ColorIndex = 0
'Identify Formulae
On Error GoTo e 'Error handler if there are no formula cells
.SpecialCells(xlFormulas).Interior.ColorIndex = 20
End With
Range("A1").Select
Next
Exit Sub
e: MsgBox "There are no cells with formulas"
End Sub

Sub IdentifyFormulae_Remove()
'Remove Identify Formulae (removes all _
cell highlights in the selection)
Selection.Interior.ColorIndex = 0
Range("A1").Select
End Sub
 
Upvote 0

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

Forum statistics

Threads
1,223,317
Messages
6,171,419
Members
452,402
Latest member
siduslevis

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top