Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default 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
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
Evaluating formula in VBA Walter Briscoe New Users to Excel 5 July 1st 09 10:33 AM
Evaluating more than 30 conditions using a formula bevchapman Excel Worksheet Functions 2 March 4th 09 06:37 PM
evaluating text as if it were a formula Peter Facey Excel Discussion (Misc queries) 2 January 31st 08 05:20 PM
Formulae created from text strings will not compute. Bart Wolf Excel Worksheet Functions 6 November 21st 06 02:01 PM
Evaluating similarity of text strings Alan Excel Worksheet Functions 6 March 30th 05 01:35 AM


All times are GMT +1. The time now is 07:57 AM.

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"