ISFORMULA(Cell Referance)

  • Thread starter Thread starter lessburgfred
  • Start date Start date
L

lessburgfred

I would like to be able to test if a cell has a formula - or not. Prefer to
return a logical.
Thanks
 
Hi,

Open VB editor, insert a module into 'ThisWorkbook' and paste the code below
in.

Call from a worksheet cell with

=IsFormula(A1)


Function IsFormula(rng As Range) As Boolean
If rng.HasFormula Then
IsFormula = True
End If
End Function
 
create a define name call HasFormula
Refers to: =GET.CELL(48,INDIRECT("RC[-1]",FALSE))

Assuming your data in Column A
In column B type: HasFormula
If the cell has A formula it returns TRUE, else FALSE
 
To take TM's idea one step further..
http://spreadsheetpage.com/index.php/tip/identify_formulas_by_using_conditional_formatting/

HTH,
Ryan--


--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


Teethless mama said:
create a define name call HasFormula
Refers to: =GET.CELL(48,INDIRECT("RC[-1]",FALSE))

Assuming your data in Column A
In column B type: HasFormula
If the cell has A formula it returns TRUE, else FALSE


lessburgfred said:
I would like to be able to test if a cell has a formula - or not. Prefer to
return a logical.
Thanks
 
Back
Top