+ Reply to Thread
Results 1 to 6 of 6

Change colour based on DDE data

  1. #1
    Registered User
    Join Date
    06-10-2009
    Location
    Prague
    MS-Off Ver
    Excel 2007
    Posts
    3

    Change colour based on DDE data

    Hello,

    is it possible to automatically change background colour based on realtime DDE data?
    These data are from broker (stock prices) and when price is higher I would like to have green background and when price goes lower then I would like to change it to red.
    I could not find anything, so any help is very appreciated.
    Thank you very much...

  2. #2
    Forum Contributor starryknight64's Avatar
    Join Date
    09-27-2006
    Location
    Missouri
    MS-Off Ver
    2003 (Work) & 2007 (Home)
    Posts
    193

    Re: Change colour based on DDE data

    First off, you would need a good way to obtain real-time data... not sure I can help you there...

    As for changing color, now that's something do-able (at least by me). Take a look at conditional formatting in these forums, you may find something of use.
    starryknight64

  3. #3
    Registered User
    Join Date
    06-10-2009
    Location
    Prague
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Change colour based on DDE data

    Thank you for your answer. I tried to catch one value from DDE with DoEvents, but I do not know how to check all values...

    Also I did not find any conditional formatting example related to change colour when some value is rising (there is no percent, range to define, only rising / falling condition). And I am totally stuck :-(

  4. #4
    Forum Contributor starryknight64's Avatar
    Join Date
    09-27-2006
    Location
    Missouri
    MS-Off Ver
    2003 (Work) & 2007 (Home)
    Posts
    193

    Re: Change colour based on DDE data

    Try changing the conditional formatting of one cell to check on a function:

    Please Login or Register  to view this content.
    Where B2 is the new data and B3 is the old (or vice-versa could work as well).

  5. #5
    Registered User
    Join Date
    06-10-2009
    Location
    Prague
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Change colour based on DDE data

    Yes, I did not emphasize it, but this changing (rising / falling) value is only in one cell (realtime changed value through DDE technology)...

  6. #6
    Forum Contributor starryknight64's Avatar
    Join Date
    09-27-2006
    Location
    Missouri
    MS-Off Ver
    2003 (Work) & 2007 (Home)
    Posts
    193

    Re: Change colour based on DDE data

    Then copy the previous value to B2 and put the present value into B3 and rinse and repeat.

    You may also want to look into looking at trends--which means conditional formatting may be harder to do... (since you'll be keeping older data than just the previous one).

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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