View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JE McGimpsey
 
Posts: n/a
Default information function - does cell contain reference

One way:

Public Function HasPrecedents(rRng As Range) As Variant
Dim rTest As Range
If rRng.Count 1 Then
HasPrecedents = CVErr(xlErrRef)
Else
On Error Resume Next
Set rTest = rRng.Precedents
On Error GoTo 0
HasPrecedents = Not rTest Is Nothing
End If
End Function


If you're not familiar with UDFs, see:


http://www.mvps.org/dmcritchie/excel/getstarted.htm


In article ,
R of Steinke wrote:

I want to create a formula that returns TRUE if the reference cell contains a
reference to any other cell and FALSE if the reference cell is a number or
text.

ISREF doesn't seem to work.