Change Excel Gantt Chart Bars from Blue to Red for Critical Tasks
Question details
Show critical-path tasks in red instead of blue on a conditionally formatted Gantt chart.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A Gantt chart colors timeline cells blue when their dates fall within a task's start and end dates, and a separate cell identifies critical tasks.
- Observed behavior
- The existing date-based rule colors task bars blue without distinguishing critical-path tasks.
Identify the timeline date row, task start and end columns, critical-status column, and first cell of the Gantt chart range. The example below uses G2 for the first timeline date, D3 and E3 for task dates, and F3 for a status of "yes".
Add a higher-priority red rule for critical tasks in Excel
Use this rule alongside the existing blue rule to highlight critical tasks without changing the rest of the chart.
Select the timeline cells that contain task bars, such as G3:AZ20. The formula in the next step assumes G3 is the top-left cell of this selection.
Go to Home > Conditional Formatting > New Rule, choose Use a formula to determine which cells to format, and enter =AND(G$2>=$D3,G$2<=$E3,$F3="yes"). Adjust the references to match your worksheet.
Click Format, open the Fill tab, select red, and click OK to create the rule.
Go to Home > Conditional Formatting > Manage Rules. Move the red rule above the existing blue rule, confirm that both apply to the intended chart range, and click Apply or OK.

Highlight critical Gantt chart tasks in WPS Spreadsheets
Use formula-based conditional formatting in WPS Spreadsheets to show critical task dates in red and other task dates in blue.
- 1. Open the workbook: Open your Excel workbook in WPS Spreadsheets and select the Gantt timeline range, such as G3:AZ20.
- 2. Add the red rule: Choose Home > Conditional Formatting > New Rule, select the formula-based rule option, and enter =AND(G$2>=$D3,G$2<=$E3,$F3="yes").
- 3. Set the fill: Open the rule's Format settings, choose a red fill, and confirm the rule.
- 4. Check rule order: Open Conditional Formatting > Manage Rules, place the red rule above the existing blue rule, and verify that both rules apply to the intended timeline range.

Frequently Asked Questions
Why is a critical task still blue?
In Home > Conditional Formatting > Manage Rules, check that the red rule is above the blue rule and applies to the task's timeline cells. Also confirm that the status cell contains the value used in the formula.
How do I adapt the formula to my Gantt chart?
Use the date header above the first selected timeline cell, the start and end dates in the task's row, and that row's critical-status cell. Keep the dollar signs aligned with the example so the references adjust across the selected range.
Will noncritical tasks remain blue?
Yes. The red rule matches only tasks whose status is "yes" and whose timeline date falls within the task dates. The existing blue rule can continue to format the other task bars.
Can I use a different critical-path indicator?
Yes. Replace "yes" in the formula with the text used in your status column, such as "critical". For a numeric indicator, use a comparison such as $F3=1 without quotation marks.




