AELLC
Structural
- Mar 4, 2011
- 1,339
Is there any way within Excel, that on a given worksheet, it will show which cells (that have a formula) have no dependent cells?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Public Function DependOnMe(Target As Range)
Dim TestCell As Range
Dim DependCount As Integer
On Error GoTo ErrorHandle
For Each TestCell In Target
If Not IsEmpty(TestCell.Address) Then
DependCount = TestCell.DirectDependents.Count
Debug.Print TestCell.Address & " has " & DependCount & " dependent cells."
End If
Next
End
ErrorHandle:
If Err.Number = 1004 Then DependCount = 0
Debug.Print TestCell.Address & " has " & DependCount & " dependent cells."
Resume Next
End Function