Formula or not

  • Thread starter Thread starter Arien
  • Start date Start date
A

Arien

What formula should I use in conditional format to see if
a cell contains a formula or not.

It looks so simple, but I just cannot find it.
All I could comeup with is CELL("prefix";A15)="'" to see if it i
text.

regards,
Arie
 
Hi
try the following:
- add the following UDF to one of your modules:
Function is_formula(rng) As Boolean
is_formula = rng.HasFormula
End Function

- In the conditional format dialog you may use the formula:
=Is_formula(A15)
 
Hi Arien!

You could use a UDF:

Function ISFORMULA(MyCell As Range) As Boolean
ISFORMULA = MyCell.HasFormula
End Function

Then use conditional formatting of the target cell based upon whether
the UDF returns TRUE or FALSE

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 
Hi Arien,
You need a User-defined function.
Use ALT+F11 to open VBA editor; click the Insert menu item, select Module
Copy this to module sheet

Function formcheck(mycell)
formcheck = mycell.HasFormula
End Function

The formula to use is =formcheck(A1)
 
Arien, here is one way form a previous post

1. Press Ctrl+F3. Excel displays the Define Name dialog box.
2. In the Names field (at the top of the dialog box), enter a name
such as FormulaInCell.
3. In the Refers To field (at the bottom of the dialog box), enter
the following:

=GET.CELL(48,INDIRECT("rc",FALSE))

4. Click OK.
Now choose Format/Conditional Formatting and set the condition to
Formula is =FormulaInCell

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 97 & 2000
** remove news from my email address to reply by email **
 
Back
Top