+ Reply to Thread
Results 1 to 5 of 5

Formating data series based on specific text

  1. #1
    Forum Contributor Portuga's Avatar
    Join Date
    02-20-2004
    Location
    Portugal
    MS-Off Ver
    365
    Posts
    852

    Formating data series based on specific text

    Hi,

    I want to have a graph that changes automatically the column colour, (to a specific colour), every time the data series has a specific name, regardless of the values of the series.

    Example:
    In the attached sheet, everytime the series is called "August" the column would change automatically to yellow.

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,814

    Re: Formating data series based on specific text

    Most strategies for "conditional formatting" of chart data are some variation on "use a different series for each color/format that you want": https://peltiertech.com/conditional-...-excel-charts/

    So, in your case, I would add a formula to column C that says "If august then N/A else value" [=IF($A2="ago",NA(),$B2)] and an inverse formula in column D that says "If august then value else N/A" [=IF($A2="ago",$B2,NA())]. Then maybe use a stacked column rather than a clustered column. Format the column C data series to be blue, and the column D data series to be yellow.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Forum Contributor Portuga's Avatar
    Join Date
    02-20-2004
    Location
    Portugal
    MS-Off Ver
    365
    Posts
    852

    Re: Formating data series based on specific text

    Thanks, that sounds like a long workaround though.
    The biggest problem to this approach is that I must use different types of charts and would involve changing a lot of the architecture of existing sheets.

    Plus I have cases where I need to have more that 1 name series marked in diff colours

    Nothing possible on the charts directly?
    Last edited by Portuga; 11-03-2018 at 04:11 PM.

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,814

    Re: Formating data series based on specific text

    I don't know what consititutes a "long" workaround in your opinion, but this approach is usually considered the easiest to build and maintain. There are no built in options in Excel's chart engine, so you can't just tell the chart to format certain points differently. I also cannot see how much work this would really require to modifying the architecture of existing sheets (I would note that rather than modifying existing architecture, I would probably add a helper range to build the chart data series in an out of the way or even hidden block of cells).

    You can format individual points in a data series in the chart. For a year that begins in Jan and ends in Dec, you could format the 8th data point to be yellow while the rest of the data series is blue. If August will always be the 8th data point, then this can work, but your OP suggests that August will not always be the 8th point, and your latest post suggests that you may have cases where you format other months as yellow. The trouble with formatting individual data points is that, each time you need to change which point is yellow, you need to format the entire data series back to its "blue" color, then identify which points need to be yellow and format those data points individually as yellow.

    You can write a VBA macro to try to automate that process. I don't know what your experience is with VBA, but this is usually considered more difficult. If you are interested, this tutorial (linked to in the previous tutorial) walks you through the VBA of such a procedure. https://peltiertech.com/vba-conditio...arts-by-value/

  5. #5
    Forum Contributor Portuga's Avatar
    Join Date
    02-20-2004
    Location
    Portugal
    MS-Off Ver
    365
    Posts
    852

    Re: Formating data series based on specific text

    Thanks for the input, I will have a look into VBA to try and solve this.

    This approach is a lot of work to the architecture in my case because I am connecting with over 50 power pivots through odc files to several OLAP cubes in the DWH outputing a lot of tables + graphs.

    The working "engine" is ready to go, now working on the cosmetics, which is not really my strong suit.
    I assumed Excel would have a inbuilt solution to this issue, something like you mentioned on the first post: "Conditional Formating", which I can do fine in tables.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Conditional formating based on specific text in string in another cell
    By mraheelgujjar in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-12-2011, 01:09 PM
  2. [SOLVED] search a series of rows for a specific formating
    By Dave Peterson in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 09-06-2005, 07:05 PM
  3. search a series of rows for a specific formating
    By Harris in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 06:05 PM
  4. search a series of rows for a specific formating
    By Dave Peterson in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-06-2005, 06:05 AM
  5. search a series of rows for a specific formating
    By Harris in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  6. search a series of rows for a specific formating
    By Harris in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM
  7. [SOLVED] search a series of rows for a specific formating
    By Harris in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM
  8. [SOLVED] search a series of rows for a specific formating
    By Harris in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-30-2005, 07:05 PM

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