Test for formula in cell

G

Graham Johnson

Using Excel 2000

To simplify my situation - cell A3 contains a formula
using values in A1 & A2

Cell A4 contains another formula that references A3 and
gives a "Circular Ref" error

In real life I use the result in A3 as approximation and
it is overwritten with a number - problem goes away

So, what I seem to need in A4 is =if(ISFUNCTION
(A3),<formula>,)

ISTEXT, ISNONTEXT, ISNUMBER do not give a correct result

Any suggestions, please (I stress that the example is
much simplified)
 
J

jpendegraft

If you are trying to determine if a cell has a formula.....

Excel does not provide a formula that identifies formulas. VBA has
function called HasFormula.
The solution is to create a custom function to identify a cel
containing a formula.

Function FormulaInCell(Cell) As Boolean
FormulaInCell = Cell.HasFormula
End Function

Use the technique described below to combine the Get.Cell formula wit
Conditional Formatting to format cells containing formulas.
After creating the formula FormulaInCell, combine it with Conditiona
Formatting.



Select a cell in the sheet, and press Ctrl+F3.
In the Define Name dialog box, type the name FormulaInCell.
Type the formula =GET.CELL(48,INDIRECT("rc",FALSE)) in the Referenc
field.
Select all the cells in the sheet by pressing Ctrl+A.
From the Format menu, select Conditional formatting.
In Condition 1, select Formula is.
In the formula box, type =FormulaInCell.
Click Format.
From the Font tab, select the color yellow, and click OK.
Click OK
 

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