+ Reply to Thread
Results 1 to 7 of 7

Conditional color format data markers

  1. #1
    Forum Contributor
    Join Date
    01-07-2006
    Location
    San Jose, CA
    MS-Off Ver
    2007, 2016
    Posts
    115

    Conditional color format data markers

    Hi,

    Sounds like one for Andy. Which is why I've moved it.

    Richard Buttrey (Mod)
    -----------------------------------------

    Hi,

    I have a line chart with data points plotted around two reference lines. Data values are less than equal to, or somewhere in between the upper and lower reference lines.

    Using VBA, is it possible to format the data point markers that are greater than or equal to the upper reference line red and to format the data point markers that are less than or equal to the lower reference line green?

    The data are dynamic and their position on the chart varies as new data are entered, so doing this manually is not a good option.

    Does anyone in the Forum have a suggestion on how to do this?

    Thanks,

    Art
    Last edited by Richard Buttrey; 07-14-2008 at 07:26 PM. Reason: More appropriate in Charting Forum

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436
    Charts do not support conditional formatting.
    You can however create the effect by using multiple series.

    These new series will display points that are above or below certain ranges by using formula.

    Post a example workbook if you need more help.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Contributor
    Join Date
    01-07-2006
    Location
    San Jose, CA
    MS-Off Ver
    2007, 2016
    Posts
    115
    Andy,

    Thanks for your offer. Attached is my worksheet. Please let me know if you have any questions.

    Thanks,

    Art
    Attached Files Attached Files

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436
    See attached.
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    01-07-2006
    Location
    San Jose, CA
    MS-Off Ver
    2007, 2016
    Posts
    115
    Andy,

    Thanks for your help. Much appreciated. One problem that I should have anticipated: if the reg length value in cell Q2 is increased from the current value (it's a user input) and new data are downloaded, the conditional formatting is present only for the first occurrences.

    I tried extending your calculation down to accommodate a longer data length and changed the chart data to include the longer length. This sort of worked, however, it messed up the x scaling on the chart.

    Can the conditional formatting be modified so that it works for any data length?

    Thanks,

    Art

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436
    Use named ranges
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    01-07-2006
    Location
    San Jose, CA
    MS-Off Ver
    2007, 2016
    Posts
    115
    Excellent. Thanks again Andy. -Art

+ 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