cell already referenced

  • Thread starter Thread starter peter
  • Start date Start date
P

peter

Hallo,

i want to know if it's possible to see if the cell is already
referenced by another cell.

For example:
I have a cell A1. Then I have a cell B1=A1+1
I want to know if there is some way that shows me that cell A1 is
referenced in cell B1.


thanks in advance.
Rg,
Peter
 
See the Precedents and DirectPrecedents properties. E.g.,

Debug.Print Range("A1").Precendents.Address


--
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2008
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
 
Sub Macro1()
For Each r In ActiveSheet.UsedRange
If r.HasFormula Then
r.ShowPrecedents
End If
Next
End Sub

will display all the references in the worksheet
 

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