+ Reply to Thread
Results 1 to 2 of 2

Set chart series color to match series legend entries font color

  1. #1
    Registered User
    Join Date
    11-23-2012
    Location
    Finland
    MS-Off Ver
    Excel 2010
    Posts
    12

    Set chart series color to match series legend entries font color

    Hi,
    I saw this example for how to set chart series colors to match source cell fill colors. The example takes the first value's fill color for each series. How do I modify it to set the color of the series to automatically match the first column that would be the series name column? (In the example, it would match column B where Q1, Q2, Q3 and Q4 are)

    My data is usually like this:

    Please Login or Register  to view this content.
    This is the example code I would like to modify (so that it would pick the font colors from the column that has name_1,name_2,...,name_i)
    Please Login or Register  to view this content.
    Thank you for any help.

    I assume it's to do with the part with
    FormulaSplit = Split(MySeries.Formula, ",")
    Set SourceRange = Range(FormulaSplit(2)).Item(1)

    SourceRangeColor = SourceRange.Interior.Color -> SourceRange.Font.Color
    Last edited by Equipoise; 01-03-2013 at 07:24 AM.

  2. #2
    Registered User
    Join Date
    11-23-2012
    Location
    Finland
    MS-Off Ver
    Excel 2010
    Posts
    12

    Re: Set chart series color to match series legend entries font color

    In what sort of "blocks" does Split function split Series.Formula? Am I correct that it splits (each) series into x-values ("purple data box") which is index 1 and y-values ("blue data box") = index 2, but you can't sort of get the name category (green box) in any way through this method, so something else should be used? Is there a way to do this?

+ 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