+ Reply to Thread
Results 1 to 1 of 1

DDE syntax (cell reference inside)

  1. #1
    Registered User
    Join Date
    09-28-2007
    Posts
    1

    DDE syntax (cell reference inside)

    First of all, sorry but English is not my 1st language, lol

    I'm a stock broker and I use a lot of excel for registers (but I'm very newbie in Excel, very).
    So I've downloaded an DDE Server to get stock prices for me.

    I can get an Stock price using:
    =TZMS|STOCK!ULT
    What I want to do is put a column with stock codes and on the right the stock price. But I can't figure out the syntax to get the stock code on another cell.
    I want something like:
    =TZMS|A21!ULT
    To get the stock price for the code in cell A21.

    How can I do that?
    Thanks everyone


    EDIT:
    I looked a lot in Internet and found this macro that changes the formula of any cell to hide the errors like "#DIV/0":

    Sub Remove_Formula_Errors()
    Dim rng As Range, cell As Range, fmla As String
    Set rng = Cells.SpecialCells(xlCellTypeFormulas, 16)
    For Each cell In rng
    fmla = Right(cell.Formula, Len(cell.Formula) - 1)
    cell.Formula = "=if(iserror(" & fmla & "), """"," & fmla & ")"
    Next
    End Sub
    Maybe someone who know VBA can adapt for me?
    The logic I need is:
    - Search cells with value "=TZMS|STOCK!ULT"
    - Replace "STOCK" with left cell's text

    Thanks
    Last edited by fbrito; 09-28-2007 at 06:21 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1