Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to detect if a cell is formula
Hi
If a cell A1 contains the formula (for example, =SUM(K2:K1000) ), Select a cell B1, from the formula menu, choose [Define Name]. In the Name box, type a name HASFORMULA and In the Refers To box, type a formula =EVALUATE(GET.CELL(48,!A1)), and choose the [Add] button and then [Close] button. In a cell B1, enter the formula: =HASFORMULA -- Regards, Soo Cheon Jheong Seoul, Korea http://excel.hompy.com _ _ ^ąŻ^ -- |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to detect if a cell is formula
Better to create a UDF than rely on EVALUATE, as there is a serious problem
with EVALUATE. The UDF would look like Function HASFORMULA(rng As Range) If rng.Count = 1 Then HASFORMULA = rng.HASFORMULA Else HASFORMULA = CVErr(xlErrRef) End If End Function -- HTH ------- Bob Phillips "Soo Cheon Jheong" wrote in message ... Hi If a cell A1 contains the formula (for example, =SUM(K2:K1000) ), Select a cell B1, from the formula menu, choose [Define Name]. In the Name box, type a name HASFORMULA and In the Refers To box, type a formula =EVALUATE(GET.CELL(48,!A1)), and choose the [Add] button and then [Close] button. In a cell B1, enter the formula: =HASFORMULA -- Regards, Soo Cheon Jheong Seoul, Korea http://excel.hompy.com _ _ ^ąŻ^ -- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VB ; How do I detect a Comment in a cell | Excel Discussion (Misc queries) | |||
Formula to detect color? | Excel Worksheet Functions | |||
Detect Presence Formula | Excel Worksheet Functions | |||
Need Formula to detect duplicate invoices | Excel Discussion (Misc queries) | |||
How to detect if a cell is formula | Excel Programming |