+ Reply to Thread
Results 1 to 11 of 11

Highlight todays dat in a Gantt Chart

  1. #1
    Registered User
    Join Date
    09-24-2018
    Location
    Liverpool, England
    MS-Off Ver
    2010
    Posts
    6

    Highlight todays dat in a Gantt Chart

    Hi,

    I have created an annual leave gantt chart with months down the left hand side, and days of the week going across the top. Each cell contains a day of the month. what I am trying to do is to highlight today's date on the chart to make it easier to use. The problem is the cells only contain a day of the month (1-31), not a actual date. I have tried all sorts to get this to work but it never automatically highlights today's date. I have put today() in a cell, and broken this into year, month and day in other cells to see if I could use Match, but still no luck. Any ideas?

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Highlight todays dat in a Gantt Chart

    It would help if you attached a sample Excel workbook, so we can see how your data is laid out.

    To do this, click on Go Advanced (below the Edit Window) while you are composing a reply, then scroll down to and click on Manage Attachments and the Upload window will open. Click on Browse and navigate to (and double-click) the file icon that you want to attach, then click on Upload and then on Close this Window to return to the Edit window. When you have finished composing your post, click on Submit Post.

    Pete

  3. #3
    Registered User
    Join Date
    09-24-2018
    Location
    Liverpool, England
    MS-Off Ver
    2010
    Posts
    6

    Re: Highlight todays date in a Gantt Chart

    Please see attachment below :-)
    Last edited by Peenutz; 09-24-2018 at 09:48 AM.

  4. #4
    Registered User
    Join Date
    09-24-2018
    Location
    Liverpool, England
    MS-Off Ver
    2010
    Posts
    6

    Re: Highlight todays dat in a Gantt Chart

    Any help appreciated, whether it be Conditional formatting or VBA :-)
    Last edited by Peenutz; 09-24-2018 at 09:47 AM.

  5. #5
    Registered User
    Join Date
    09-24-2018
    Location
    Liverpool, England
    MS-Off Ver
    2010
    Posts
    6

    Re: Highlight todays dat in a Gantt Chart

    please see image attached Untitled.jpg

  6. #6
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Highlight todays dat in a Gantt Chart

    We can't do much with an image - you clearly have an Excel workbook, so please attach that.

    Pete

  7. #7
    Registered User
    Join Date
    09-24-2018
    Location
    Liverpool, England
    MS-Off Ver
    2010
    Posts
    6

    Re: Highlight todays dat in a Gantt Chart

    Hi, sorry for only getting back, I was away for a few days and have only just got back to my work computer.

    I have attached my file.
    Attached Files Attached Files

  8. #8
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Highlight todays dat in a Gantt Chart

    In some of the cells in your calendar you have an entry of BH (presumably for Bank Holiday) rather than a number - you won't be able to make a date out of that.

    Pete

  9. #9
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Highlight todays dat in a Gantt Chart

    Nevertheless, you can do it like this:

    Select all the cells from C3 to AM14, then click on Conditional Formatting | New Rule | Use a formula... , then put this formula in the dialogue box:

    =AND(TEXT(TODAY(),"mmmm yyyy")=$B3,DAY(TODAY())=C3)

    Click on the Format button | Fill tab and choose your colour (e.g. yellow), and you might want to embolden the text so click the Font tab and click on Bold (you might also want to change the colour of the foreground text - click on the Color drop-down and select your colour. Then you need to click OK twice to exit the dialogue box, and you should see today's box highlighted with yellow.

    Obviously, this won't show if you have letters in the calendar boxes (although I've just thought of a way that might work - I'll post back)

    Hope this helps.

    Pete

  10. #10
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,704

    Re: Highlight todays dat in a Gantt Chart

    You should use this formula in the CF dialogue instead:

    =AND(TEXT(TODAY(),"mmmm yyyy")=$B3,DAY(TODAY())=COUNTA($C3:C3))

    and then this will highlight the correct day cell, irrespective of whether it contains a number or text value.

    Hope this helps.

    Pete

  11. #11
    Registered User
    Join Date
    09-24-2018
    Location
    Liverpool, England
    MS-Off Ver
    2010
    Posts
    6

    Re: Highlight todays dat in a Gantt Chart

    Yaay, it works! Thank you so much, I've been scratching my head for weeks over this!

+ 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. [SOLVED] Userform Calendar highlight todays Date
    By gsandy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-01-2018, 08:12 PM
  2. [SOLVED] Have the ability to view a daily Gantt chart as a monthly gantt chart
    By adam_d_john in forum Excel General
    Replies: 3
    Last Post: 03-13-2018, 09:11 PM
  3. [SOLVED] Highlight weekends in a stacked bar (Gantt) chart (Excel 2007)
    By dacheeba in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 01-07-2018, 12:53 AM
  4. Replies: 0
    Last Post: 01-07-2015, 01:22 PM
  5. Replies: 5
    Last Post: 10-04-2012, 07:01 AM
  6. Replies: 0
    Last Post: 07-13-2012, 06:40 PM
  7. Highlight column if todays date
    By scott488 in forum Excel General
    Replies: 10
    Last Post: 10-11-2010, 07:16 AM

Tags for this Thread

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