Archive of Mr Excel Message Board

Back to Dates in Excel archive index
Back to archive home

=Isformula ???? Does something like this exist
Posted by Travis on September 28, 2001 12:48 PM
Anybody know a formula that evaluates whether a cell has a formula in it?
For example
=isformula(A1)
if A1 has a formual in it then the "isformula" would return True, else False
Or something like that...
Thanks

Re: =Isformula ???? Does something like this exist
Posted by Aladin Akyurek on September 28, 2001 1:43 PM
Travis --
You need a user-defined function for this. The following code will do what you want.
Function IsFormula(c)
IsFormula = c.HasFormula
End Function
A piece code that one comes across very often
Aladin
============

What's this? Aladin's using the dreaded VBA !
Posted by . on September 28, 2001 3:54 PM

Re: =Isformula ...Thanks
Posted by Travis on September 28, 2001 9:08 PM

If you want to highlight cells containing formulas (without reverting to VBA !) ......
Posted by Ian on September 28, 2001 9:28 PM
Define a name (let's say, HasFormula) and type in the refers to box =GET.CELL(48,INDIRECT("rc",FALSE))
Select the cells you want highlighted if they contain a formula. Go to conditional formatting, put in the FormulaIs box =HasFormula, and set your format.

This archive is from the original message board at www.MrExcel.com.
All contents © 1998-2004 MrExcel.com.
Visit our
online store to buy searchable CD's with thousands of VBA and Excel answers.
Microsoft Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.