For many years, the documentation for the CELL function stated that
you could use it to determine whether a cell has a formula, but it
never worked. So they changed the documentation.
You have to use a VBA function:
Public Function HasFormula(R As Range) As Boolean
HasFormula = R(1,1).HasFormula
End If
Cordially,
Chip Pearson
Microsoft Most Valuable Professional,
Excel, 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com
On Thu, 25 Mar 2010 10:17:03 -0700, DoubleZ
wrote:
In excel 2007, is there a formula to determine whether or not a cell contains
a formula? Basically I want to do and If/Then function that will return a
certain answer if a cell contains a formula and will return a different
answer if the cell only contains text (that was manually entered in).
Thank you.
DoubleZ