Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Evaluating a DDE formula created by strings
Hello! This is a very frustrating problem I have been working on for
quite some time and have not been able to come up with a solution. As you know, DDE formulas are in the form: =APP|TOPIC!'FIELD' My initial problem is that I can't use cell referencing in these DDE formules (eg. =APP|TOPIC!'A1' will try to retrieve the piece of data called A1 rather than pick up the contents of the cell A1. So then I tried to use a VBA solution by creating a function like so (off the top of my head): Function GetValue(App as String, Topic as String, Field as String) As String |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Evaluating a DDE formula created by strings
Function GetValue(App as String, Topic as String, Field as String) As
String Dim command as String command = "="&App&"|"&Topic&"!'"&Field&"'" GetValue = command End Function So then I type in Excel, =GetValue(App,Topic,A1) And great! The Cell showed =APP|TOPIC!'(Value of cell A1)' However, how can I get Excel to evaulate the formula, instead of showing the formula as a string? |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Evaluating a DDE formula created by strings
Try these amendments:
command = App&"|"&Topic&"!'"&Field&"'" GetValue = Evaluate(command) Hope this helps. Pete On Sep 18, 9:32*am, JessicaRowe wrote: Function GetValue(App as String, Topic as String, Field as String) As String Dim command as String command *= "="&App&"|"&Topic&"!'"&Field&"'" GetValue = command End Function So then I type in Excel, =GetValue(App,Topic,A1) And great! The Cell showed =APP|TOPIC!'(Value of cell A1)' However, how can I get Excel to evaulate the formula, instead of showing the formula as a string? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Evaluating formula in VBA | New Users to Excel | |||
Evaluating more than 30 conditions using a formula | Excel Worksheet Functions | |||
evaluating text as if it were a formula | Excel Discussion (Misc queries) | |||
Formulae created from text strings will not compute. | Excel Worksheet Functions | |||
Evaluating similarity of text strings | Excel Worksheet Functions |