+ Reply to Thread
Results 1 to 4 of 4

Consistent line colors in pivot chart based on Asset or ID#

  1. #1
    Registered User
    Join Date
    12-04-2012
    Location
    California, USA
    MS-Off Ver
    Excel 2007
    Posts
    10

    Consistent line colors in pivot chart based on Asset or ID#

    Ok. I've been beating my head against my keyboard trying to figure this one out and that hasn't been helping.

    I have a pivot chart that has a few hundred Assets with volumes gathered every month. Several slicers help me zero in on various factors. However as I adjust the slicers and asset get filtered out, all of my line colors adjust. The first asset on the list is always blue, the second is always orange and so on...

    Ideally, I'd like the line for each asset to be constant. Ie Asset 20 is always blue, Asset 21 is always Red, etc... And if there is any way that I dont have to set each color individually, that would be amazing (as I said, there are a few hundred assets in the actual spreadsheet).

    Each asset has its own ID#, just in case that might help.

    I've uploaded an example of what I have so far. Any help would be greatly appreciated!

    https://www.excelforum.com/attachmen...1&d=1492755601

    Thank you.
    Attached Files Attached Files

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,910

    Re: Consistent line colors in pivot chart based on Asset or ID#

    This took a couple of recorded macros and stitching together with VB code. The thing I don't like about working with charts is that you have to activate the chart. I have yet to find a way to work with a chart object. If anyone knows how to do this let me know. Anyway, attached is the spreadsheet. On the color map, list the name of the series, and then shade the cell with the color you would like that series to be.

    Run the macro SeriesColor and it will change the series to the indicated color regardless of how many other series are displayed.
    Attached Files Attached Files
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Registered User
    Join Date
    12-04-2012
    Location
    California, USA
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Consistent line colors in pivot chart based on Asset or ID#

    You are my new favorite person!
    Thank you, you have saved me an unimaginable amount of time.

  4. #4
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,910

    Re: Consistent line colors in pivot chart based on Asset or ID#

    It thought this was worth while and with a few mods, it's now in my "library."

+ 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. Changing cells and column chart colors based on cell colors
    By HDeuce in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-03-2016, 11:43 AM
  2. Using VBA to maintain consistent bar chart colors
    By bighitter in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-09-2016, 05:01 PM
  3. Change bar chart colors to be consistent with another chart
    By Larry.LeBlanc@O in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 11-17-2014, 08:26 PM
  4. Keeping the colors of pie chart slices consistent
    By BarryKSC in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 07-31-2014, 01:01 PM
  5. Replies: 1
    Last Post: 05-07-2012, 11:53 AM
  6. Consistent Colors for Pivot Charts
    By zasskar in forum Excel Charting & Pivots
    Replies: 6
    Last Post: 01-15-2008, 11:22 AM
  7. Chart Line Colors
    By cweaverster in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 07-24-2007, 01:02 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