ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Links and Linking in Excel (https://www.excelbanter.com/links-linking-excel/)
-   -   Macro updates and link goes #REF! ??? (https://www.excelbanter.com/links-linking-excel/13298-macro-updates-link-goes-ref.html)

Rob Smith

Macro updates and link goes #REF! ???
 
I (Excel 2003) have a WS(Data) containing a macro that updates a cell (stock
quote) via a toolbar button.

I have linked this cell to another WS cell (=Data!$B$1) which works fine if
I manually change the input.

However, when I run the Macro, which refreshes the data from the URL the
linked cell loses the link and I get (=Data!#REF!)

Can anyone help here please?

Thanks in advance ...




Bill Manville

Rob Smith wrote:
when I run the Macro, which refreshes the data from the URL the
linked cell loses the link and I get (=Data!#REF!)

Can anyone help here please?


It would help if we could see the macro.
If you cut and paste to/from the cell or delete the cell then you would
get this effect.

If such an operation is inevitable then you could change the formula to
=INDIRECT("Data!$B$1")

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - respond to newsgroup



All times are GMT +1. The time now is 02:28 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com