Chart & Visualization Issues

Add Task Labels to an Excel Conditional Formatting Gantt Chart

Natalie TaylorNatalie Taylor Nov 18, 2026 869 views

Question details

Display task names inside the date cells of a conditionally formatted Excel Gantt chart without VBA.

Add Task Labels to an Excel Conditional Formatting Gantt Chart
Product
Microsoft Excel
Device & OS
not provided
Scenario
A user has a Gantt chart built with conditional formatting and wants each active date cell to show its task name.
Observed behavior
The desired result is a timeline whose active date cells display task names along with the existing Gantt formatting.
Before you start

Identify the task name, start date, end date, and timeline header cells in your worksheet. The example below assumes task names are in column B, start dates in column C, end dates in column D, and the first timeline date in BA5.

Solution 1Recommended

Use a formula to show task names in active Gantt cells

Enter a formula in the timeline grid to return the task name whenever a date overlaps the task period.

1
Enter the label formula

Select BA7, the first timeline cell for the first task, and enter =IF(AND($D7>=BA$5,$C7<BA$5+1),$B7,""). Adjust the cell references to match your worksheet.

2
Fill the timeline

Drag the fill handle from BA7 across the date columns and down the task rows, or select the target range and use Home > Fill.

3
Check the formatting

Select the timeline grid and open Home > Conditional Formatting > Manage Rules. Confirm that the Gantt rule still applies to the full grid and uses the appropriate date and task references.

4
Make labels readable

Use Home > Wrap Text or adjust the timeline column widths if task names do not fit inside the date cells.

Use a formula to show task names in active Gantt cells
Formula references: The dollar signs keep the task columns fixed when filling across and the date header row fixed when filling down. The formula returns a blank string outside the task period.
Work with Gantt charts in WPS

Add Gantt Task Labels in WPS Spreadsheet

Use a formula in WPS Spreadsheet to display task names in active timeline cells, then check the conditional formatting on the Gantt grid.

  1. 1. Open the workbook: Open WPS Spreadsheet and select Open to load your Excel Gantt chart workbook.
  2. 2. Add the formula: Select the first task timeline cell and enter =IF(AND($D7>=BA$5,$C7<BA$5+1),$B7,"") for the example layout. Change the references to match your sheet.
  3. 3. Fill the grid: Drag the cell's fill handle across the timeline and down through the task rows.
  4. 4. Review formatting and save: Select the timeline and check its rules under Home > Conditional Formatting. Use File > Save As to save the workbook in XLSX format.
Add task labels to a conditional formatting Gantt chart without VBAOpen and edit Microsoft Excel XLSX filesFill formulas across timeline columns and task rowsUse familiar spreadsheet formatting tools
QA img-9

Frequently Asked Questions

Do I need VBA to show task names in Gantt cells?

No. Enter an IF formula in the first timeline cell that returns the task name when the timeline date falls within the task period, then fill it across and down.

What if my task names are not in column B?

Replace $B7 in the formula with the task name cell for the first row, such as $A7 for column A. Keep the dollar sign before the column letter when filling across.

Why do some task labels appear cut off?

The task name may be wider than the timeline cell. Select the cells and use Home > Wrap Text, or widen the date columns.

Will the existing Gantt colors still work after I add formulas?

That depends on how the conditional formatting rule is written. Select the timeline and check Home > Conditional Formatting > Manage Rules to verify the rule and its applied range.