Cellwise Start free

Excel guide · 5 min read

How to create a Gantt chart in Excel

Quick answerList each task with a start and end date, put one date per column across the top, then select the grid and add a conditional formatting rule like =AND(G$1>=$B2,G$1<=$C2). Every cell whose date falls inside a task's dates fills in, which draws the bars. Change a date and the bar moves on its own.

Sample data

Every result on this page was calculated from this sheet by the same spreadsheet engine the Cellwise app uses.

ABCDEFGHIJKL
1TaskStartEndOwner% doneNov 2, 2026Nov 3, 2026Nov 4, 2026Nov 5, 2026Nov 6, 2026Nov 7, 2026
2Plan scopeNov 2, 2026Nov 4, 2026Maya1
3Design mockupsNov 5, 2026Nov 11, 2026Leo0.6
4Write contentNov 9, 2026Nov 17, 2026Maya0.4
5Build pagesNov 12, 2026Nov 24, 2026Sam0.1
6Test and fixNov 23, 2026Nov 27, 2026Leo0
7LaunchNov 30, 2026Nov 30, 2026Sam0
8
9As ofNov 10, 2026

Download this sheet as an Excel practice file (.xlsx)

Step 1: Tasks, dates and a timeline header

Say you're running a website relaunch in November. Six tasks, three people, and your manager wants to see at a glance what overlaps. Put Task, Start, End, Owner and % done in columns A to E, one task per row.

Leave column F empty as a gap, then put the timeline across row 1. Type the first date (Nov 2) in G1, put =G1+1 in H1 and fill it right. In Excel 365 you can do the whole header in one cell instead: =SEQUENCE(1,MAX(C2:C7)-MIN(B2:B7)+1,MIN(B2:B7)) spills 29 dates, Nov 2 to Nov 30, and grows if a task moves later.

Make the timeline readable: format G1 across with the custom format d (so Nov 2 shows as 2) and narrow those columns to about 3. Right-click the column letters and choose Column Width to set them all at once.

=SEQUENCE(1,MAX(C2:C7)-MIN(B2:B7)+1,MIN(B2:B7))

Result: spills 1 row × 29 columns

4632846329463304633146332463334633446335463364633746338463394634046341463424634346344463454634646347463484634946350463514635246353463544635546356

29 dates across one row, from Nov 2 to Nov 30, 2026: one column per day of the project.

Step 2: Draw the bars with conditional formatting

A cell belongs to a task's bar when its column date is on or after the start and on or before the end. That's the whole rule.

The $ signs are what make it work for the entire grid. G$1 locks the row, so every row reads its date from the header. $B2 and $C2 lock the columns, so every column reads the start and end from the task's own row. Get one of them wrong and the bars slide or vanish.

The check here is for the Design mockups row (Nov 5 to Nov 11) in column J, which is Nov 5. It's TRUE, so that cell fills. Column I is Nov 4 and comes back FALSE.

  1. Select the grid, G2:AI7, starting from the top-left cell G2.
  2. Go to Home > Conditional Formatting > New Rule > Use a formula to determine which cells to format.
  3. Type =AND(G$1>=$B2,G$1<=$C2), click Format, pick a fill color on the Fill tab, and click OK twice.
=AND(J$1>=$B3,J$1<=$C3)

Result: TRUE

TRUE: Nov 5 is inside Design mockups (Nov 5 to Nov 11), so that cell is part of the bar.

Step 3: Shade the part that's done

A plain bar shows when a task runs. A darker part inside it shows how far along it is. Design mockups is 7 days long and 60% done, so the first 4 days (7 x 0.6, rounded) get the darker color.

Add a second rule to the same grid with a darker fill: =AND(G$1>=$B2,G$1<=$B2+ROUND(($C2-$B2+1)*$E2,0)-1). In Home > Conditional Formatting > Manage Rules, move it above the plain bar rule so it wins where both are true.

For one number that sums up the whole project, weight each task by its length: =SUMPRODUCT((C2:C7-B2:B7+1)*E2:E7)/SUMPRODUCT(C2:C7-B2:B7+1) returns about 0.32, so the relaunch is roughly 32% done by days of work.

=AND(M$1>=$B3,M$1<=$B3+ROUND(($C3-$B3+1)*$E3,0)-1)

Result: TRUE

TRUE: Nov 8 is the 4th day of Design mockups, still inside the 60% that's done.

Step 4: Weekends, a today marker and a status column

Two more rules make the chart honest. =WEEKDAY(G$1,2)>5 shades Saturday and Sunday columns, so a bar that crosses a weekend doesn't look like more work than it is. =G$1=$B$9 highlights the column for the as-of date in B9. Put =TODAY() in B9 and the marker moves every day.

Durations in working days come from NETWORKDAYS, which counts Monday to Friday and includes both ends: =NETWORKDAYS(B3,C3) gives 5 for Design mockups, although it spans 7 calendar days. Going the other way, =WORKDAY(B5,8) gives the end date of a 9-workday task starting Nov 12: Nov 24.

A status column next to the tasks saves your manager from reading colors. With the as-of date of Nov 10, this formula compares the time gone with the % done and flags Design mockups as Behind: 6 of its 7 days have passed but it's only 60% done.

=IF(E3=1,"Done",IF(C3<$B$9,"Late",IF(B3>$B$9,"Not started",IF($B$9-B3+1>(C3-B3+1)*E3,"Behind","On track"))))

Result: Behind

Behind: 6 of 7 days are gone but Design mockups is only 60% done.

The chart version: a stacked bar chart

If you need a real chart for a slide deck, a stacked bar chart can fake a Gantt chart. The idea is two series per task: an invisible bar for the start date and a visible bar for the length.

The grid version is easier to keep up to date and shows weekends and today. The chart version looks better in a presentation. Many people keep the grid for planning and paste the chart into the deck.

  1. Add a Days column with =C2-B2+1 next to your tasks.
  2. Select the Task, Start and Days columns (hold Ctrl to pick columns that aren't next to each other), then Insert > Insert Column or Bar Chart > Stacked Bar.
  3. Click the Start series (the first color) and set Format > Shape Fill > No Fill. Only the duration bars remain.
  4. Right-click the task names on the vertical axis, choose Format Axis and tick Categories in reverse order so the first task is at the top.
  5. Right-click the date axis, choose Format Axis and set Minimum to your first date. Type it as a date, or as its serial number (Nov 2, 2026 is 46328).

Common mistakes

Bars appear in the wrong rows or not at all

The rule needs G$1 (row locked) and $B2, $C2 (columns locked), and it must be written for the top-left cell of the selection. Select from G2, not from the bottom.

Dates typed as text in the header

If the header holds text like "Nov 2", the comparisons never match. Use real dates (=G1+1) and change only the format to d or ddd.

Progress shading hidden under the plain bar

Conditional formatting rules apply top to bottom. In Manage Rules, put the darker % done rule above the bar rule.

Counting days with End minus Start

C2-B2 is one short: a task from Nov 2 to Nov 4 is 3 days. Use C2-B2+1 for calendar days or NETWORKDAYS for working days.

FAQ

Does Excel have a Gantt chart template?

Yes. File > New and searching for "Gantt" shows Microsoft's project templates. They use the same idea as this guide, conditional formatting or a stacked bar chart, so it helps to know how they work when you need to change one.

How do I add holidays to an Excel Gantt chart?

List the holiday dates in a range, say K12:K15, and add a rule =COUNTIF($K$12:$K$15,G$1)>0 with a gray fill. Pass the same range as the third argument of NETWORKDAYS and WORKDAY so durations skip them too.

How do I show weeks instead of days?

Put Mondays in the header with =G1+7 and change the rule to =AND(G$1+6>=$B2,G$1<=$C2), which fills a week column if any day of that week overlaps the task.

Can I make a Gantt chart without conditional formatting?

Yes, with a formula in each cell: =IF(AND(G$1>=$B2,G$1<=$C2),1,"") puts a 1 inside the bar, and you can color the 1s or format them as a block character. Conditional formatting keeps the grid clean, so it's usually the better pick.

Functions used

Related guides

Updated