Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Is it possible? | Excel Worksheet Functions | |||
Formula is counting cell if nothing is entered | Excel Discussion (Misc queries) | |||
Formula checking multiple worksheets | Excel Worksheet Functions | |||
inserting data from a row to a cell, when the row number is specified by a formula in a cell | New Users to Excel | |||
looking for a formula | Excel Worksheet Functions |