color a cell with a formula in it?

S

Sandy

Add a User Defined Funtion UDF

In a code module. In Excel, Alt-F11 to the VBIDE, insert a module,
Insert>Module, and paste that code in.
Function IsFormula(rng As Range)
IsFormula = rng.HasFormula
End Function

Then then add that in the CF formula
=IsFormula(A10)
HTH
 
K

Ken

Exactly what I was looking for
Thankyou

Sandy said:
Add a User Defined Funtion UDF

In a code module. In Excel, Alt-F11 to the VBIDE, insert a module,
Insert>Module, and paste that code in.
Function IsFormula(rng As Range)
IsFormula = rng.HasFormula
End Function

Then then add that in the CF formula
=IsFormula(A10)
HTH
 
G

Gerritvanzyl

I used this UDF and it work like a charm, however... whenever I use this
function in a conditional format.. something funny happen... When I refer
from a different sheet to a cell on this sheet with the conditional format
in... it does not work... excell wrongly put the stuff in the refered
sheet... hope my explanation make sence!
 
D

David McRitchie

References:
You may not use references to other worksheets or Workbooks for Conditional Formatting criteria.
To get around this obstacle you might use a named range to refer to a range on another worksheet.
The restriction also means that you cannot use a formula referencing your personal.xls in a user defined function. You can get
around that by creating a reference in your VBE from your workbook to your personal.xls

For more information on Conditional Formatting:
http://www.mvps.org/dmcritchie/excel/condfmt.htm
For more information on named range
http://www.mvps.org/dmcritchie/excel/vlookup.htm#namedrange
 
Top