Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Forrest
 
Posts: n/a
Default Need to rebuild formula using the value entered into a cell on the

I know this process can be done in VBA. I have done it. But using vba also
requires that I have a mechanism to run the code. This would either be a
timer, button, or event. However, I would like to, if possible, use the
tools available in Excel to create this "Dynamic Equation."

I have a DDE Server called IQLink. I need to create function for the DDE
service. The service currently accepts equations in this format:
=IQLink|NGF6!Last (give last traded price for natural gas for january 06)

In cell A1, I have the Symbol (Manually Entered): NGF6

I need to create the equation that will still work as an equation in a
number of other cells based on that cell. Currently I have been able to make
the string value using: ="=IQLink|" & A1 & "!Last"

This equation results in: =IQLink|NGF6!Last in the cell, but the problem is
obviously that I have created a string and now the service will not operate
on it. I need to get this result, but in the format of an equation so that
it will do the calculations using the DDE service.

In case you are not familiar with DDE, I believe if you know the answer in a
situation that is using a normal excel function, that would be helpful to me
as well.

I hope I have been descriptive enough. Thanks for the help.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gary''s Student
 
Posts: n/a
Default Need to rebuild formula using the value entered into a cell on the

This function may help you:


Option Explicit
Function Eval(s As String) As Variant
With Application
.Volatile
Eval = .Evaluate(s)
End With
End Function

so if you have in A1 =1+1 as a text string, then =Eval(A1) will return a 2
--
Gary''s Student


"Forrest" wrote:

I know this process can be done in VBA. I have done it. But using vba also
requires that I have a mechanism to run the code. This would either be a
timer, button, or event. However, I would like to, if possible, use the
tools available in Excel to create this "Dynamic Equation."

I have a DDE Server called IQLink. I need to create function for the DDE
service. The service currently accepts equations in this format:
=IQLink|NGF6!Last (give last traded price for natural gas for january 06)

In cell A1, I have the Symbol (Manually Entered): NGF6

I need to create the equation that will still work as an equation in a
number of other cells based on that cell. Currently I have been able to make
the string value using: ="=IQLink|" & A1 & "!Last"

This equation results in: =IQLink|NGF6!Last in the cell, but the problem is
obviously that I have created a string and now the service will not operate
on it. I need to get this result, but in the format of an equation so that
it will do the calculations using the DDE service.

In case you are not familiar with DDE, I believe if you know the answer in a
situation that is using a normal excel function, that would be helpful to me
as well.

I hope I have been descriptive enough. Thanks for the help.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson
 
Posts: n/a
Default Need to rebuild formula using the value entered into a cell on the

Since you're passing the string to your UDF, I think you could drop the
..volatile portion.



Gary''s Student wrote:

This function may help you:

Option Explicit
Function Eval(s As String) As Variant
With Application
.Volatile
Eval = .Evaluate(s)
End With
End Function

so if you have in A1 =1+1 as a text string, then =Eval(A1) will return a 2
--
Gary''s Student

"Forrest" wrote:

I know this process can be done in VBA. I have done it. But using vba also
requires that I have a mechanism to run the code. This would either be a
timer, button, or event. However, I would like to, if possible, use the
tools available in Excel to create this "Dynamic Equation."

I have a DDE Server called IQLink. I need to create function for the DDE
service. The service currently accepts equations in this format:
=IQLink|NGF6!Last (give last traded price for natural gas for january 06)

In cell A1, I have the Symbol (Manually Entered): NGF6

I need to create the equation that will still work as an equation in a
number of other cells based on that cell. Currently I have been able to make
the string value using: ="=IQLink|" & A1 & "!Last"

This equation results in: =IQLink|NGF6!Last in the cell, but the problem is
obviously that I have created a string and now the service will not operate
on it. I need to get this result, but in the format of an equation so that
it will do the calculations using the DDE service.

In case you are not familiar with DDE, I believe if you know the answer in a
situation that is using a normal excel function, that would be helpful to me
as well.

I hope I have been descriptive enough. Thanks for the help.


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is it possible? DakotaNJ Excel Worksheet Functions 25 September 18th 06 09:30 PM
Formula is counting cell if nothing is entered Jennifer Excel Discussion (Misc queries) 4 December 15th 05 01:18 AM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 03:28 AM
inserting data from a row to a cell, when the row number is specified by a formula in a cell [email protected] New Users to Excel 2 January 6th 05 07:18 AM
looking for a formula Amanda Excel Worksheet Functions 5 January 5th 05 07:37 AM


All times are GMT +1. The time now is 09:30 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"