Formula versus value

W

wammer

Is there a function that will tell me whether or not a cell is a type
value or a formula
 
F

Frank Kabel

Hi
1. create a custom function in VBA. e.g.
public function is_formula(rng as range)
is_formula=rng.hasformula
end function

2. Use the following formula
=IS_FORMULA(A1)
for cell A1
 
G

Gord Dibben

wammer

No built-in function.

User defined function.....

Function IsFormula(Cell)
Application.Volatile
IsFormula = Cell.HasFormula
End Function

Copy/paste to a general module in your workbook

Usage is: =ISFORMULA(A1)

Alternative if you just want to find which cells have formulas..........

Select a range of cells and F5>Special>Formulas>OK

Gord Dibben Excel MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top