Auditing cells: Find "dangling"cells
Sige,
Try;
Dim ranCell As Range
For Each ranCell In Selection
On Error Resume Next
Debug.Print ranCell.Dependents.Count
If Err.Number = 1004 Then
ranCell.Interior.Color = vbBlue
End If
Err.Clear
On Error Resume Next
Next ranCell
'Dependents' seems to return an error rather than zero on the count - which
is a bit annoying - I'm sure someone will chime in if there is a better way.
Regards,
Chris.
--
Chris Marlow
MCSD.NET, Microsoft Office XP Master
"Sige" wrote:
Hi There,
It is the time of the year again ...where I receive a ton of
spreadsheets with "massacred" templates. Finding "constants in
formulas" is an incredible tool by Norman Jones which solved already a
lot of my misery!
Here is another issue:
-I would like to find the cells on my active sheet / selection that are
"not used". Meaning that they do not serve as input or further
calculation ...
I.e. they do not have dependents.
-Possible to trigger also those cells which have dependents in other
sheets in the active wbk
Best Regards, Sige
PS: XL97
|