ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Add reference to DDE Link formula (https://www.excelbanter.com/excel-worksheet-functions/98654-add-reference-dde-link-formula.html)

xlcharlie

Add reference to DDE Link formula
 
I have a number of formulas used to pull data from another system into Excel.
Three example formulas a

=Systemx|Bid!GOOG
=Systemx|Ask!GOOG
=Systemx|Last!GOOG

Systemx is the other system. After the | is the argument specifying what
information to pull. And you might recognize the argument after the ! as a
stock ticker. I want to replace the ticker with a cell reference so that I
can change the value in the cell from GOOG to YHOO and the formulas will
recalculate with the data from YHOO instead of GOOG. If I try to just
replace the ticker with the cell reference, the resulting formula,
=Systemx|Ask!'A13', doesn't work.

I'm think there should be a way to construct the formula as a string (e.g.
="Systemx|Ask!" & A13) and then force Excel to evaluate the string as a
function. As is, Excel will construct the string and then display it as text
in the cell rather than evaluate it as a function. I know I can do a
work-around using VBA, but I'm hoping there is a solution without VBA,
perhaps a built in function.

Is anyone familiar with DDE links or otherwise know a way to fix my problem?
Thanks for your help!


All times are GMT +1. The time now is 07:31 PM.

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