View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Bob is offline
external usenet poster
 
Posts: 972
Default Identifying formulas using a Validation rule

A member of this forum provided the following UDF to display a formula within
a cell:

Function GetFormula(Cell As Range) As String
GetFormula = Cell.Formula
End Function

I tried creating the following €ścustom€ť Validation rule for cell A1 (which
happens to contain a formula):

=LEFT(GetFormula(A1),1)="="

but it is not working correctly (I get a €śNamed range cannot be found€ť error
message).

I want to ensure that someone doesn't inadvertently over-write a cell
containing a formula.

Can anyone show me how to do this using a Validation rule? I am aware of a
solution using Conditional Formatting, but I really need to use a Validation
rule.

Any help would be greatly appreciated.

Thanks,
Bob