Tracing dependents - Excel 2003

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way that I can highlight all the cells in a worksheet that contain
values that are used by formulas in other worksheets/workbooks?
 
Perhaps this, although it will show all dependents on-sheet as well and not
just those off-sheet

Sub ShowDeps()

Dim myrng As Range
Dim myrng1 As Range
Dim myrng2 As Range

With ActiveSheet
Set myrng1 = Intersect(.UsedRange, _
.UsedRange.SpecialCells(xlCellTypeFormulas, 23))
Set myrng2 = Intersect(.UsedRange, _
.UsedRange.SpecialCells(xlCellTypeConstants, 23))
End With

Set myrng = Union(myrng1, myrng2)

For Each cel In myrng
cel.ShowDependents
Next cel
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top