+ Reply to Thread
Results 1 to 13 of 13

When I Hide Columns, My Bar Column colors change automatically...

  1. #1
    Registered User
    Join Date
    06-18-2012
    Location
    Abu Dhabi
    MS-Off Ver
    Excel 2007
    Posts
    8

    When I Hide Columns, My Bar Column colors change automatically...

    Hi Guys

    Here is my first post so hope to get replies

    i have a matrix with the row being revenue, and columns being multiple scenarios for different month

    i.e.

    Jan Bud Jan Frcst Jan Act Feb Bud Feb Frcst Feb Act.......
    Revenue

    i wish to create a chart showing different color for each scenario i.e. red for Jan Bud, Feb Bud, Mar Bud.... Blue for Jan Frcst, Feb Frcst....
    i don't want to select multiple series as this will take a lot of time (12month*4scenarios) + i have around 30 charts to build

    I have found a way online to select info as one series of data; i then manually colored the bars as needed.
    Until here everything is working fine (unless you have a fast and easy method to use)

    Now here is the challenge. when i hide one of the scenario, the corresponding chart gets hidden as expected HOWEVER the bar color change again... so Bud becomes both Red & Blue.....

    Can anyone suggest a solution (that is if i was clear)!
    untitled.JPG


    Thanks
    MJS

  2. #2
    Valued Forum Contributor
    Join Date
    04-30-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    547

    Re: When I Hide Columns, My Bar Column colors change automatically...

    Can you detail you data layout?

    In the attached file, you can see two different data tables and two different charts.

    If you filter the lower data table, the chart will update, but the series colours will stay the same.

    If your setup is different, please post a workbook.
    Attached Files Attached Files
    Like a post? Click the star below it!

  3. #3
    Registered User
    Join Date
    06-18-2012
    Location
    Abu Dhabi
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: When I Hide Columns, My Bar Column colors change automatically...

    Hi npamcpp

    Thank you that was a really quick reply!
    here you go my workbook. yes the setup is different as this is system generated

    Thanks
    Mansour
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    06-18-2012
    Location
    Abu Dhabi
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: When I Hide Columns, My Bar Column colors change automatically...

    as a quick note the series color was standard blue and was manually colored for all bars.
    i believe this is why when i hide one of the scenario (see control room) the colors get crazy......

    is there an easy and fast way to setup the chart from scratch but still get the same results?

  5. #5
    Valued Forum Contributor
    Join Date
    04-30-2012
    Location
    Australia
    MS-Off Ver
    Excel 2010
    Posts
    547

    Re: When I Hide Columns, My Bar Column colors change automatically...

    Where exactly do you set the filters? Please understand that I have no idea how your spreadsheet is structured. You will need to point to the parts that don't work.

  6. #6
    Registered User
    Join Date
    06-18-2012
    Location
    Abu Dhabi
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: When I Hide Columns, My Bar Column colors change automatically...

    the master sheet include all the relevant data: revenue per month-scenario. to filter I hide the columns i do not wish to see; the chart then automatically hides the corresponding bars.
    when i hide the columns "budget" for example, all the budget bars (12) gets hidden which is fine; however the colors change i.e. if budget is setup as red, i expect not see any red bar on the graph.
    apologies if i am not being very clear... hope you get the chance to look at the uploaded file (forecast model) - maybe there is an easier way of formatting it?

    Thanks again for your time
    MJS

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

    Re: When I Hide Columns, My Bar Column colors change automatically...

    You either need to set the data point colours via code in order to retain the same colour for "Budget" whether "Last Year" is hidden or not.

    Or change the layout of your source data so you can hide a series without lossing the formatting of the remaining series.
    Cheers
    Andy
    www.andypope.info

  8. #8
    Registered User
    Join Date
    06-18-2012
    Location
    Abu Dhabi
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: When I Hide Columns, My Bar Column colors change automatically...

    Thanks Andy... but
    How do i do that !?

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

    Re: When I Hide Columns, My Bar Column colors change automatically...

    Revised data layout.

    I also added code to the hide/unhide routines to toggle row hidden property.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    06-18-2012
    Location
    Abu Dhabi
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: When I Hide Columns, My Bar Column colors change automatically...

    Thanks Andy ... however won;t be able to use this as this is a system generated report can't toggle all data...
    hope you have an other method.
    again one of the solution is to setup all as one series. and then manually color the bars. but the question remains why are the colors changing when i hide the columns

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

    Re: When I Hide Columns, My Bar Column colors change automatically...

    The problem you have is that the colours are NOT changing when the chart data changes.

    It goes RED, ORANGE, GREEN, BLUE, BLUE.

    When you hide Last Year data the labels update but the colours remain RED, ORANGE, GREEN, BLUE, BLUE.

    I don't see why, as you already have macro code in the workbook, you can not use code to re structure the source data.

  12. #12
    Registered User
    Join Date
    06-18-2012
    Location
    Abu Dhabi
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: When I Hide Columns, My Bar Column colors change automatically...

    Hi Andy

    Thanks again... to be honest i don't know how to do that...

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

    Re: When I Hide Columns, My Bar Column colors change automatically...

    Who generates this system report?
    Get them to create it so it works as expected.

+ 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