Dana,
precedents EXCLUDE references to cells other than activesheet.
[sheet1!a1].formula = "=sheet2!a1"
msgbox [sheet1!a1].precedents.count '<No CellsFound
Testing .Formula < .Value appears similar to .HasFormula
surprisingly it is 3x faster.
--
keepITcool
|
www.XLsupport.com | keepITcool chello nl | amsterdam
Dana DeLouis wrote in
what about formulas which use named ranges.
Maybe one could include something like this:
Dim nPrecedents As Long
On Error Resume Next 'In case there are none
nPrecedents = ActiveCell.Precedents.Count
If n 0 Then
' There are cell references...
End If