ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Tracing dependents - Excel 2003 (https://www.excelbanter.com/excel-discussion-misc-queries/18462-tracing-dependents-excel-2003-a.html)

Michelle

Tracing dependents - Excel 2003
 
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?
--
Michelle

Ken Wright

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

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------

"Michelle" wrote in message
...
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?
--
Michelle





All times are GMT +1. The time now is 05:52 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com