ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Function to detemine whether function or value in cell (https://www.excelbanter.com/excel-discussion-misc-queries/121041-function-detemine-whether-function-value-cell.html)

nc

Function to detemine whether function or value in cell
 
Is there a function in Excel 2003 which can return info. on whether a cell
contains a function or a value?

Billy Liddel

Function to detemine whether function or value in cell
 


"nc" wrote:

Is there a function in Excel 2003 which can return info. on whether a cell
contains a function or a value?


You could use this UDF

Function isFormula(x) As String
If x.HasFormula Then
isFormula = "Has Formula"
Else
isFormula = "Has Value"
End If
End Function

Copy this into a VB Module and use as normal function. If you want to use
this in all your workbooks copy it into a module in a new blank book and save
it as Personal.

Regards
Peter


Bob Phillips

Function to detemine whether function or value in cell
 
whey not just return true or false for a function?

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Billy Liddel" wrote in message
...


"nc" wrote:

Is there a function in Excel 2003 which can return info. on whether a

cell
contains a function or a value?


You could use this UDF

Function isFormula(x) As String
If x.HasFormula Then
isFormula = "Has Formula"
Else
isFormula = "Has Value"
End If
End Function

Copy this into a VB Module and use as normal function. If you want to use
this in all your workbooks copy it into a module in a new blank book and

save
it as Personal.

Regards
Peter




nc

Function to detemine whether function or value in cell
 
What is the function?

"Bob Phillips" wrote:

whey not just return true or false for a function?

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Billy Liddel" wrote in message
...


"nc" wrote:

Is there a function in Excel 2003 which can return info. on whether a

cell
contains a function or a value?


You could use this UDF

Function isFormula(x) As String
If x.HasFormula Then
isFormula = "Has Formula"
Else
isFormula = "Has Value"
End If
End Function

Copy this into a VB Module and use as normal function. If you want to use
this in all your workbooks copy it into a module in a new blank book and

save
it as Personal.

Regards
Peter





Billy Liddel

Function to detemine whether function or value in cell
 
Bob means

Function isformula(x) As String
If x.HasFormula Then
isformula = True
Else
isformula = False
End If
End Function

Thanks Bob



"nc" wrote:

What is the function?

"Bob Phillips" wrote:

whey not just return true or false for a function?

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Billy Liddel" wrote in message
...


"nc" wrote:

Is there a function in Excel 2003 which can return info. on whether a

cell
contains a function or a value?

You could use this UDF

Function isFormula(x) As String
If x.HasFormula Then
isFormula = "Has Formula"
Else
isFormula = "Has Value"
End If
End Function

Copy this into a VB Module and use as normal function. If you want to use
this in all your workbooks copy it into a module in a new blank book and

save
it as Personal.

Regards
Peter





Dave Peterson

Function to detemine whether function or value in cell
 
Or even:

Function isformula(x as range) As Boolean
isformula = x.cells(1).HasFormula
End Function

Billy Liddel wrote:

Bob means

Function isformula(x) As String
If x.HasFormula Then
isformula = True
Else
isformula = False
End If
End Function

Thanks Bob

"nc" wrote:

What is the function?

"Bob Phillips" wrote:

whey not just return true or false for a function?

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Billy Liddel" wrote in message
...


"nc" wrote:

Is there a function in Excel 2003 which can return info. on whether a
cell
contains a function or a value?

You could use this UDF

Function isFormula(x) As String
If x.HasFormula Then
isFormula = "Has Formula"
Else
isFormula = "Has Value"
End If
End Function

Copy this into a VB Module and use as normal function. If you want to use
this in all your workbooks copy it into a module in a new blank book and
save
it as Personal.

Regards
Peter





--

Dave Peterson


All times are GMT +1. The time now is 06:13 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com