Listing all cell references

  • Thread starter Thread starter Karra
  • Start date Start date
K

Karra

I would like to write a macro that would take a cell (or range) and
print out the list of other cells in the workbook that reference each
of them

We are doing a huge cleanup of an already complicated and messy
workbook, and this I'd like to implement intermediate consistency
checks.

Can someone point me in the right direction for implementing something
like this?

Thanks.
 
the FindCirc.zip file on Stephen Bullen's site should get you started:

http://www.oaltd.co.uk/Excel/Default.htm

It is for finding circular references, but I suspect all the code you need
is there.

It uses xl4 macro commands in some places to handle off sheet references.
If you don't have any then just look at the the

DirectDependents/DirectPrecedents
and
Dependents/Precedents
properties of the Range class. Loop through your cells and examine these
for an Intersect with the cells of interest. These only work with
references on the same sheet.
 

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