Making a Gantt chart in Excel
The stacked bar chart most tutorials propose looks pretty in a screenshot and is painful to live with: it has to be reconfigured every time a task is added. Conditional formatting gives a better result, and it fits in two formulas.
The starting table
A readable schedule fits in four columns. The rest — percentages complete, owners, budgets — is added later, on the right, without breaking anything.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Task | Start | Duration | End |
| 2 | Design | 02/11/2026 | 5 | 06/11/2026 |
| 3 | Order | 09/11/2026 | 4 | 13/11/2026 |
| 4 | Assembly | 16/11/2026 | 6 | 23/11/2026 |
The formula for column D, in D2 and then copied down:
=WORKDAY(B2,C2-1,$Z$1:$Z$20)
The -1 is not an affectation: without it, a one-day task would finish the day after it started. The duration counts the start day.
The range $Z$1:$Z$20 will hold the public holidays — we come to that.
WORKDAY is called
SERIE.JOUR.OUVREthere, and commas become semicolons. Excel translates automatically when displaying: a formula typed in English in an English Excel stays correct for a colleague whose interface is in French.
The date scale
To the right of the table, one column per day. In F1, the first date; then each column adds a day:
F1 : =B2
G1 : =F1+1 then copy to the right over 60 to 120 columns
Select the whole of row 1 from F onwards, set the custom number format to
j so that only the day of the month shows, and give the columns a width of 2.5. You get a dense, readable grid.
A second header row makes the schedule far more comfortable — the month, shown once per month:
F2 : =IF(MONTH(F1)<>MONTH(E1),UPPER(TEXT(F1,"mmm yyyy")),"")
The bars, through conditional formatting
This is where the method parts company with the stacked bar chart. Rather than drawing, we colour: each cell of the grid asks itself whether its date falls within its row's task.
- Select the grid, from
F3to the last column and the last task. - Home → Conditional Formatting → New Rule → Use a formula.
- Type the formula below, then choose a green fill.
=AND(F$1>=$B3,F$1<=$D3)
Where you put the $ is the whole secret.
F$1 freezes the row: whatever the cell, we always look at the date on the scale, at the top. $B3 and
$D3 freeze the column: we always look at the start and the end of the task, on the left. Without those dollars, the rule drifts and colours anything at all.
| A | F | G | H | I | J | K | L | |
|---|---|---|---|---|---|---|---|---|
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | |
| 3 | Design | |||||||
| 4 | Order |
Working days and French public holidays
The schedule is right, but the bar runs through the weekends: the task looks as if it lasts longer than it does. Two corrections are needed.
Declare the public holidays
Put them in a column out of the way — Z1:Z20 in our formulas. Six of them have a fixed date (1st January, 1st May, 8 May, 14 July, 15 August, 1st November, 11 November, 25 December). The other three depend on Easter, which is worked out by this formula — here it is for the year in A1:
' Easter Sunday
=ROUND(DATE(A1,4,1)/7+MOD(19*MOD(A1,19)-7,30)*14%,0)*7-6
' The three holidays that follow from it
Easter Monday = Easter + 1
Ascension = Easter + 39
Whit Monday = Easter + 50
Checked in Excel: this formula gives Sunday 5 April 2026, Sunday 28 March 2027 and Sunday 16 April 2028. It is correct from 1900 to 2199.
Colour only the working days
Replace the conditional formatting rule with this one:
=AND(F$1>=$B3,F$1<=$D3,WEEKDAY(F$1,2)<6,COUNTIF($Z$1:$Z$20,F$1)=0)
Two conditions are added: WEEKDAY(F$1,2)<6 rules out Saturday and Sunday — the argument 2 makes the week start on Monday, which gives 6 and 7 for the weekend. And
COUNTIF(...)=0 rules out the dates present in the holiday list.
Add a second rule, in pale grey this time, to tint the weekend columns down the whole height of the schedule. It becomes readable at a glance:
=WEEKDAY(F$1,2)>5
A 4-working-day task starting on Monday 9 November 2026 finishes on Friday the 13th, not Thursday the 12th: Wednesday 11 November is a public holiday, and the formula skipped it. That is precisely what a hand-made schedule forgets every other time.
Today, overruns and milestones
The today line. A third rule, applied to the whole grid, with a thick red left border:
=F$1=TODAY()
Overruns in red. Add a Progress
column in E (from 0 to 100%), then a rule with priority:
=AND(F$1>=$B3,F$1<=$D3,$D3<TODAY(),$E3<100%)
Any task whose end date has passed while it is not finished lights up. Place this rule above the green rule in the manager, and tick “Stop If True”: the order of the rules decides which colour shows.
Milestones. A task with zero duration produces no bar. Give it a duration of 1 and a rule of its own that shows a diamond, through a custom cell format
"◆" on a transparent background.
Where this method stops
This schedule is honest and it is yours. Three things will be missing from it the day the project grows.
- Dependencies. Nothing links the end of “Design” to the start of “Order”. If the design slips by three days, you have to shift all the following tasks by hand. You can write
=WORKDAY(D2,1)in B3, but the chain breaks as soon as you insert a row or reorder. - Direct manipulation. Lengthening a task means going back to column C and typing a number. On a thirty-row schedule, the constant to-and-fro between the table and the grid wears you down.
- The critical path. Knowing which tasks have no float calls for a forward and backward pass that conditional formatting cannot carry.
As long as your schedule fits on one screen and moves once a week, the method above is amply enough — and that is why this guide exists. Beyond that, you need an engine that recalculates the dependencies at every gesture.
And if you would rather not maintain it yourself
The add-in takes everything above and adds what formulas cannot do: you grab a task with the mouse, you lengthen it, and the tasks that depend on it re-plan themselves — in working days, with the critical path shown.
Try the online demonstration → Lifetime licence €19, no subscription · Refunded for 30 days · Windows + Excel 2016 or newerFrequently asked questions
Why not use a stacked bar chart?
It is the most quoted method, and the most painful to live with: you have to hide the first series, reverse the category axis, reset the scale every time the period changes, and the chart does not follow when a task is added. Conditional formatting recalculates itself and prints properly.
How do I handle the team's leave, on top of public holidays?
Simply add it to the same column as the public holidays: WORKDAY and COUNTIF treat all those dates the same way. To distinguish leave per person, you need WORKDAY.INTL and one range per resource.
My schedule covers two years: do I need 730 columns?
No. Move to a weekly scale: F1 stays the start date, G1 becomes =F1+7, and the rule compares weeks rather than days. You keep the overall picture, at the cost of day-level precision.
Can this schedule be printed properly?
Yes, provided you freeze the panes on columns A to D, define the print area and tick “Repeat columns at left” in page setup. Without that, page 2 onwards comes out with no task names.
Does conditional formatting slow the workbook down?
It is recalculated every time the sheet changes. On 30 tasks and 120 columns, it is imperceptible. From a few thousand cells concerned and several overlaid rules, typing becomes noticeably less fluid: reduce the scale or limit the range to the columns actually used.