+ Reply to Thread
Results 1 to 8 of 8

Conditional format in gantt charts

  1. #1
    Registered User
    Join Date
    08-13-2020
    Location
    England
    MS-Off Ver
    365
    Posts
    18

    Conditional format in gantt charts

    Hello,

    I'm using one of the pre-existing simple gantt chart templates on excel and I'm trying to alter the conditional formatting rules based on the resources.
    I.e I want to be able to select crew 1 or crew 2 in column B (assigned to) (will need about 20 in total, but I can generate a list from data validation) and for it to then colour code the progress bars on the gantt chart according to which crew I've picked.

    So if I select crew 1, the duration bars will turn red, crew 2 the bars will turn blue etc etc.

    Regards,

    Alex

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,985

    Re: Conditional format in gantt charts

    You'd need one rule per crew (so adding the reference to the rule you have and duplicating it - do this with cell H7 selected, as this is the first cell in the range):

    =AND(task_end>=H$5,task_start<I$5,$B7="name of crew")

    Assign your chosen colour to each rule.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

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

    Re: Conditional format in gantt charts

    If you expect to have up to 20 different crews, then you will need 20 different CF rules. You can amend your existing rule (for dark blue) to this:

    =AND(task_end>=H$5,task_start<I$5,$B7="Hussey crew")

    and choose red for the background. You will need to create 19 new rules for the same range for the other crews with appropriate colours.

    Hope this helps.

    Pete

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,607

    Re: Conditional format in gantt charts

    This is lot of conditional formatting and it will be so colorful at the end.

    How about this, if you select team in B column it will make red all other activities of that team, and blue all others.

    For example, select B42 and you'll get red in rows 42, 43, 44 and 45.
    Select B46 and you'll get red in rows 46, 50 and 62
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    08-13-2020
    Location
    England
    MS-Off Ver
    365
    Posts
    18

    Re: Conditional format in gantt charts

    Hi all,

    Thanks for the replies. Zbor, your idea isn't quite what I'm after. Need it more in line with the first couple of ideas, I don't mind adding more formats as I add more crews.

    I've added a load in now to the updated one, but some of them aren't applying the rules I've made and I can't work out why.

    See rows 91 (should be pink for suprafilt), an 107 downwards (various colours depending on crew selected).

    Assuming there's another rule in the worksheet that is taking precedence, but I can't work out which one it is.

    Thanks,

    Alex

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,985

    Re: Conditional format in gantt charts

    Check (you check) that the terms are proper matches. Look out for leading and trailing spaces in your data that mean you don't have an exact match of the crew name.

  7. #7
    Registered User
    Join Date
    08-13-2020
    Location
    England
    MS-Off Ver
    365
    Posts
    18

    Re: Conditional format in gantt charts

    That's the one! Thanks Ali.

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,985

    Re: Conditional format in gantt charts

    Glad to have helped.

    If you have not already done so, you may not be aware that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.

+ 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 formatting and formulas for gantt charts
    By sdegr001 in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 08-23-2021, 03:19 PM
  2. Conditional format formula needed for time gantt chart
    By broodytood in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-15-2016, 10:34 PM
  3. [SOLVED] Gantt Charts & Conditional Formatting
    By highguyuk in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-10-2015, 04:27 PM
  4. [SOLVED] Does conditional format apply to bars of a Gantt chart ?
    By adriano.r.marques in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 07-01-2015, 03:27 PM
  5. Fun with Gantt charts
    By Juvenal in forum Excel General
    Replies: 0
    Last Post: 04-03-2012, 07:53 PM
  6. Gantt Charts done with Conditional Formatting
    By nielsoneo in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-16-2012, 02:25 PM
  7. [SOLVED] conditional format of data tables in charts
    By [email protected] in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 01-25-2005, 12:06 PM

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