This is a toughey guys.

  • Thread starter Thread starter Natasha
  • Start date Start date
N

Natasha

My current formula is ILX|Q!'stock symbol,feildcode'

Stock symbol can be any stock (ie..GE, KO, CSCO, etc..)

Feildcode is what info I want on the stock (ie..bid, ask,
close, etc..).

So for me to see what the current ask price is for GE then
I type in a cell: =ILX|Q!'GE,ASK'

Here is the problem. This is what I want to do and it
doesn't work.

Cell A1: =ILX|Q!'A2,A3'
cell a2: GE
Cell A3: ASK

Please help!!!!!!!!!!!!!!!!!1
 
My current formula is ILX|Q!'stock symbol,feildcode'

Stock symbol can be any stock (ie..GE, KO, CSCO, etc..)

Feildcode is what info I want on the stock (ie..bid, ask,
close, etc..).

So for me to see what the current ask price is for GE then
I type in a cell: =ILX|Q!'GE,ASK'

Here is the problem. This is what I want to do and it
doesn't work.

Cell A1: =ILX|Q!'A2,A3'
cell a2: GE
Cell A3: ASK

Unless there's some VBA way of evaluating DDE expressions, there's no way to
construct variable DDE expressions in Excel. DDE expressions must always be
hardcoded, meaning you can't use cell references to construct them.

A potential work-around involves constructing *strings* that appear to be
hardcoded DDE formulas, copying them, pasting them as values which leaves them
strings, then replacing = with =, which converts the strings to formulas.

For example, given your sample cells above, enter this formula in A1.

="=ILX|Q!'"&A2&","&A3&"'"

This should evaluate to the *string* "=ILX|Q!'GE,ASK'". Copy cell A1 and
paste-special as values on top of itself. Then Edit > Replace, finding = and
replacing it with =. This should convert A1 into the formula =ILX|Q!'GE,ASK'.
Again, unless there's something in VBA that'll handle this, this is the best you
can do.

Does anyone know whether ExecuteXL4Macro handles DDE formula?
 
Back
Top