In Excel, you can tell a cell to reference another cell in order to calculate its value. I'd like to be to do the opposite, to get any cells that reference the currently-selected cell. Is this at all possible in Excel, either as one of the built-in functions or a VBA script?
|
feedback
|
|
Can't say how to use it programmatically, but from the Formulas ribbon, there is a "Formula Auditing" pane that allows you to "Trace Dependents" and will draw a visual arrow on the sheet from the currently selected cell to any that reference it via a formula. There's a corresponding "Trace Precedents" command as well. | |||||||
feedback
|
|
Here is a link to the trace precedents vba example on msdn. http://msdn.microsoft.com/en-us/library/aa195797(office.11).aspx | |||
|
feedback
|
|
Apparently you can access Trace Precedents/Dependents in a macro: Macro Code To Trace Dependents/Precedents @ OzGrid.com, with a link to a post with a completed VBA function @ vbaexpress.com:
FYI, the author of the second post says that this function cannot handle external references to closed workbooks. That is left as an exercise for the reader. | |||
|
feedback
|
|
In Office 2007, look under formulas and use trace precedents or trace dependents. I can't remember where it is in earlier versions but it's much the same action | |||
|
feedback
|