+ Reply to Thread
Results 1 to 4 of 4

Unusual Number Format With DDE

  1. #1
    Registered User
    Join Date
    06-20-2008
    Posts
    2

    Unusual Number Format With DDE

    I have cells in Excel that are linked using DDE to data in another application (market price data for stocks and commodities). When this market data changes, it is automatically updated in the Excel spreadsheet.

    Two of the markets (Treasury Bonds and Treasury Notes) are traded in thirty-seconds and sixty-fourths of a point. But the data is displayed with the following format:

    112 14.5

    In this example the market price is 112 and 14.5 thirty-seconds (29 sixty-fourths), or 112.453125.

    I need to use this number in other cell formulas, but the problem is that the DDE link displays the number in the cell as:

    112[space]14.5

    I don't know how to write a formula that would remove the space between 112 and 14.5, so that I could divide the 14.5 by 32 and arrive at the result of 112.453125.

    Or remove the space, multiply 112 by 32, add 14.5, and then divide by 32.

    Can someone point me in the direction of an Excel Function or Formula that could accomplish this?

    Much appreciated,

    Gerry
    Last edited by gpercy; 06-20-2008 at 01:03 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    If there is always a number, a space, and another number (0 to 31.5), then =LEFT(A1, FIND(" ", A1) - 1) + MID(A1, FIND(" ", A1) + 1, 4) / 32

  3. #3
    Registered User
    Join Date
    06-20-2008
    Posts
    2
    Wow. Thanks so much for your help! I don't do that much Excel programming, and you just saved me much time and a possible headache ... Thanks again!

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    You're welcome, glad it worked for you.

+ 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