Formatting Issues

Change Excel Gantt Chart Bars from Blue to Red for Critical Tasks

Khadija KhanKhadija Khan Nov 18, 2026 869 views

Question details

Show critical-path tasks in red instead of blue on a conditionally formatted Gantt chart.

Change Excel Gantt Chart Bars from Blue to Red for Critical Tasks
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.
Before you start

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".

Solution 1Recommended

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.

1
Select the Gantt chart cells

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.

2
Create a formula rule

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.

3
Choose the red fill

Click Format, open the Fill tab, select red, and click OK to create the rule.

4
Set the rule priority

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.

Add a higher-priority red rule for critical tasks in Excel
Match your worksheet: The formula uses the timeline date in row 2 and the task information in columns D, E, and F. Replace "yes" if your critical-path column uses a different value. Some regional settings require semicolons instead of commas in formulas.
Format Gantt charts in WPS

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. 1. Open the workbook: Open your Excel workbook in WPS Spreadsheets and select the Gantt timeline range, such as G3:AZ20.
  2. 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. 3. Set the fill: Open the rule's Format settings, choose a red fill, and confirm the rule.
  4. 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.
Distinguish critical tasks from normal Gantt chart barsOpen and save Microsoft Excel XLSX and XLS filesUse a familiar spreadsheet interfaceEdit spreadsheets with free WPS Office tools
microsoft office alternative - wps office

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.