Help with linking......

qawhaq

New Member
Joined
Nov 17, 2002
Messages
15
Is there a FORMULA which will tell what external reference a cell is linked to?

Say cell A1 on workbook1 is linked to cell A1 on workbook2: =[Book2]Sheet1!$A$1

In cell A2 on Workbook1, I want a formula which returns the name and location of the link, NOT the value. Cell A2 needs to return "[Book2]Sheet1!$A$1"

I need the return to be the file name so I can use it within INDIRECT form formulas elsewhere in workbook1.

Any thoughts?
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
A UDF will get you there. There may be another way already cooked into Excel but this will work:

Code:
Function getFormula(rng As Range) As String
Dim Formula


Formula = CStr(rng.Formula)


getFormula = Replace(Formula, "=", "", 1)


End Function
 
Upvote 0
This means that you can either (1) use a UDF like the one I put in above or (2) add the range address a string somewhere in the worksheet so it can be referred to in your INDIRECT function.
 
Upvote 0

Forum statistics

Threads
1,215,433
Messages
6,124,861
Members
449,194
Latest member
HellScout

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top