+ Reply to Thread
Results 1 to 5 of 5

Graph to display past dates in one colour and remaining dates in other colour

  1. #1
    Forum Contributor
    Join Date
    02-15-2012
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2019
    Posts
    431

    Graph to display past dates in one colour and remaining dates in other colour

    Hi,

    Need help on putting different colours to past dates and today to weekend / monthend in different colour.

    An excel file attched with necessary details.

    Pl. help.

    Thanks,
    Nagesh.
    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,827

    Re: Graph to display past dates in one colour and remaining dates in other colour

    My typical first suggestion for "conditional" formatting of a chart data series is this one: https://peltiertech.com/conditional-...-excel-charts/ As with many charting issues, most of the work is in the spreadsheet creating the helper columns for each "condition", but it is fairly straightforward.
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Forum Expert Roel Jongman's Avatar
    Join Date
    03-28-2015
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    1,483

    Re: Graph to display past dates in one colour and remaining dates in other colour

    I have a solution for the week graph by day. but not for the chart by week. I do not get the adjusted weeknumbers where week 1 is 10 days and week 4 only 4 days. does every month start with week 1? is week 1 always the longer week?

    For the Blue and green graph per day I used 2 series.
    and a forced error in the if formula helps to hide unwanted data points.
    in the Graph settings you set to leave #NA errors blank on the graph.

    check the file for details.
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    02-15-2012
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2019
    Posts
    431

    Re: Graph to display past dates in one colour and remaining dates in other colour

    Thats great @Joel Jangman.

    Thanks.

    As far as week is concerned, we distribute in to 4 weeks (1 or 2 plus, say in April, date 1 starts on Friday and the month is shared by 5 weeks. In order to make a 4 weeks, 1st and 2nd included in week one. Similarly if a month ends say Monday or Tuesday, the extra 1 or 2 days will be added in to last week. Otherwise graph will show 5 weeks and first or last week will show as poor performing week (since the working days are less). Hence if the formula is set as per the week numbers given as per column D, then there will always be 4 weeks and the working days can be adjusted in 1st or last week.

    Hope it is clear now.

    Grateful if you can show a way out on the weeks graph too.

    Anyhow thanks once again.

  5. #5
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,561

    Re: Graph to display past dates in one colour and remaining dates in other colour

    The following proposal adds the "Customized Week Numbers" column to the Plan sheet also.
    1. Cell J2 is populated using: =INDEX(Actual!D3:D32,MATCH(I2,Actual!B3:B32,0))
    2. Cells J17:J20 are populated using: =IF(RIGHT(H17,1)+0<J$2,SUMIFS(Actual!C$3:C$32,Actual!D$3:D$32,RIGHT(H17,1)+0),NA())
    3. Cells K17:K20 are populated using: =IF(ISERROR(J17),SUMIFS(Plan!C$3:C$32,Plan!D$3:D$32,RIGHT(H17,1)+0),NA())
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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. Linking colour of line graph to colour of an unrelated cell?
    By Marisa5567 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 11-10-2020, 05:36 AM
  2. [SOLVED] How to show (by colour) the difference between 2 dates
    By Tony0731 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-07-2019, 12:00 PM
  3. [SOLVED] Change colour of cell when dates past
    By tim2018 in forum Excel General
    Replies: 2
    Last Post: 03-02-2018, 04:57 AM
  4. Automatic colour change for dates
    By roskalov in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-17-2017, 03:50 AM
  5. [SOLVED] Colour coding dates
    By mfairhurst1 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-18-2013, 11:13 AM
  6. [SOLVED] I cannot automatic - mark with colour a set dates
    By jpol in forum Excel - New Users/Basics
    Replies: 8
    Last Post: 02-04-2013, 04:46 AM
  7. excel if/then functions with dates and colour
    By Prins in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 11-08-2012, 01:21 AM

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