Dependents and Direct Dependents Properties

The Dependents property returns a Range object that represents all cells containing all the dependents of a cell. To illustrate, consider Figure 19-12, where we have displayed the underlying formulas in each cell.

Figure 19-12. Illustrating the Dependents property

A

B

C

1

1

=A1

2

=AT2

3

4

=AT3

5

6

=BV2

The following code selects cells B1, B2, C4, and C6:

Range("A1").Dependents.Select

Note that C6 is not a direct dependent of A1.

By contrast, the following line selects the direct dependents of cell A1, which are cells B1, B2, and C4:

Range("A1").DirectDependents.Select

0 0

Post a comment