馃攳
How to Make a Gantt Chart in Excel - YouTube
Channel: Vertex42
[0]
Hello, and welcome to Vertex42. Watch
this video to learn how I create this
[4]
Gantt Chart template including features
like the scroll bar and the ability to
[9]
show the progress of each task.
[21]
The essential information for a Gantt Chart
is a list of tasks with start and end dates.
[29]
After making the columns wider,
I'll add some data to work with.
[31]
I'm going to speed up the video here for a bit.
[35]
To use the default date format, I'll
use CTRL+SHIFT+3
[41]
Then finish the table.
[46]
The next step is to create the date
range or timeline for the chart area.
[51]
I'll start with November 1st for now.
[54]
I want to display just the day of the month,
[56]
so I'll use the custom number format
"d"
[61]
It's important to realize that these
[62]
cells are storing the full date but only
displaying the day of the month.
[69]
I want to show the first letter of the day of
the week in the cell below the date.
[73]
First, I'll use the text function to
display the abbreviation for the day of
[78]
the week. Then I'll use the left function
to grab just the first letter of that text.
[89]
Next, I'll merge these seven cells to
display the full date of the first day of the week.
[96]
and I need to change the
date format back to the default.
[102]
Now I'm going to select the group of
seven columns and copy it to the right.
[114]
To make the chart area dynamic,
[116]
I'll first add a place to enter the project start date.
[120]
Then I'll link the first cell in the chart
area to that date.
[126]
Then I'll use a formula to add
one day to each of the next dates
[132]
now when the project start date changes,
the chart area will change.
[143]
When I start formatting, I usually turn
the gridlines off.
[147]
I'll insert a couple rows at the top for a title later.
[150]
I like table headers that have a dark
background with a light font.
[157]
I'll reduce the font size of the
days and then turn on Shrink-To-Fit.
[166]
I'll select the entire worksheet and
change the vertical alignment to middle.
[173]
I'll add some indenting to the tasks.
[183]
Horizontal borders make a Gantt chart easier
to read, so we'll put those in now.
[194]
I want the project start date to be a longer
date format, so I'll merge the cells and make
[200]
a custom number format.
[203]
I'll display the day of the week, the day,
the month abbreviation, and the full year.
[211]
I'll add a border to show that this date
is meant to be edited.
[218]
Next, I'll just make the other chart
labels a bit more interesting.
[229]
We can condense things a bit more, also.
[238]
I'll use the format painter to copy the
formatting to the next two weeks.
[246]
Now for the tricky part.
We could add the bars of
[249]
the Gantt chart by changing the fill
color manually, but
[252]
that's way too time-consuming. Instead,
we use conditional formatting to shade
[257]
this cell when the date at the top of the
column is within the start date and the end date.
[263]
First, we'll select all these cells,
[265]
Go to "Conditional Formatting" > "New Rule" >
then "Use a Formula"
[273]
We'll use the logical function "AND" and set this date
[276]
greater than equal to the START, comma,
the date less than or equal to the END.
[285]
It's important to create the formula
based on the upper left cell in the range.
[290]
We need to let the columns of the top row change
[294]
as well as the rows of the start and end dates.
[299]
Select the purple theme color.
[303]
And that's it! Actually, we have some more
cool stuff to do.
[311]
So our timeline currently starts on the same day
as the project start. But, I wanted to always
[315]
start on Monday. First, I'll name cell B3
"project_start" using the name box.
[322]
Then, I'll edit this formula to subtract the
weekday of the project start.
[328]
You can press tab to choose the selected name
[331]
We want option 3 where Monday is zero.
[335]
Now the weeks in the timeline will
start on Monday, regardless.
[341]
Some quick cleanup and then I'll add a
couple more weeks to the chart.
[346]
Press CTRL+SpaceBar to select the column.
[351]
Now I'm going to add an input
that will let me scroll a Gantt Chart.
[354]
CTRL+D copies down.
Then I'll change the label to "Display Week"
[360]
Start with a 1 and center it.
Then I'll add the border.
[366]
Now I'm going to name this cell using the name box.
Call it "display_week"
[371]
Then edit the first date in the timeline again
[374]
to add the display_week - 1 times 7.
[380]
Now when I change the display week,
[382]
the dates in the timeline will update,
making the Gantt chart appear to scroll.
[390]
The Scroll Bar form control is in the
developer ribbon.
[393]
To turn on the developer ribbon,
go to File > Options > Customize Ribbon.
[401]
Then select the developer box.
[406]
To insert the Scroll Bar, go to Developer > Insert
and select the scrollbar form control.
[414]
Then click and drag to draw the scrollbar.
[418]
Right-click on it to select Format Control.
[423]
Select the cell to link to,
which for us is the display week.
[432]
Now you can use the scroll bar to
change the display
[443]
Adding a line to mark today's date is pretty simple.
[447]
Go to Conditional Formatting > New
Rule > Use a Formula.
[451]
The formula is just going to be a comparison
of the date at the top of the column
[455]
to the function TODAY.
[459]
We'll add red borders so we can
still see the bars in the chart.
[468]
Done. On to the next step.
[474]
After inserting new columns,
the "Insert Options" button gives options for formatting.
[479]
I'll choose "Format Same as Right"
[482]
So these cells are formatted as dates,
[485]
so I'll change them back to the "General" format.
[488]
This first new column is for who
the task is assigned to.
[492]
I need to turn on "Wrap Text"
and reduce the font size a bit.
[500]
This column will be for entering the
current progress or percent complete.
[505]
I'm going to use conditional formatting to
add progress bars within these cells.
[511]
These are called "Data Bars"
[514]
I need to edit the formatting rule to
represent 0 to 100%
[520]
So I'll set the Type to "Number" and set the
Minimum to 0 and the Maximum to 1.
[527]
And I'll make it gray so it doesn't stand out so much.
[533]
We need to move these labels now.
Cut and Paste.
[537]
I'll add the project title and placeholders
for company name and project lead.
[550]
I want to represent the progress by shading
a portion of the bar with a conditional formatting rule
[555]
that works essentially like this:
[557]
where 1s are shaded and 0s are not.
[559]
This is kind of hard to see so I'll change the font to white.
[564]
I'm going to create this formula
in stages using names to make it easier to read.
[569]
The date at the top of the column needs
to be within the start and end dates,
[575]
But, now the end is calculated by adding
the start date plus days_complete - 1 day.
[582]
and I need the date row to remain fixed
(add a $ sign).
[588]
This formula doesn't work yet
because I haven't defined the names
[593]
I'll go to Formulas > Name Manager > New.
[596]
Enter task_start,
Set the Scope to this sheet,
[601]
Then select the start cell and make the
row number relative (no $ sign)
[607]
I'll create one for task_end as well.
[612]
These are what we call "relative named ranges"
[617]
I'll create one more for the task_progress column.
[630]
Now I need to expand the
day's complete to finish the formula.
[633]
This is the task_progress times the total days
which is task_end - task_start + 1.
[642]
Ah, I forgot to convert the boolean to 1s and 0s.
[646]
There we go. I'll copy that over and test it out.
[658]
Looks like it's working, so I'll copy the
formula.
[664]
Go to Home, then I need to hit ESC
because I'm still in edit mode.
[670]
I'll select the range and then add a new
conditional formatting rule.
[676]
I'll paste the formula
then choose a gray fill color.
[683]
Great! I'll clear these cells then try it out.
[693]
The last thing I'll do is define the
print settings.
[696]
A Gantt Chart usually works better
in landscape orientation.
[701]
I set margins to Narrow,
but I want the top and bottom margins smaller,
[705]
so I'll change them to half an inch.
[709]
Then change the scaling to
fit on one page wide
[712]
and I don't want to print the scroll bar.
[716]
With objects like the scrollbar, you can
Right-Click, go to Properties and uncheck Print Object.
[723]
Now let's go to Page Layout and
set rows to repeat on each page.
[729]
I'll add page numbers to the footer.
[740]
I'll finish with adding my logo.
[746]
I hope watching this video has helped you
learn at least a few new things about Excel.
[752]
This is the first video of a new series
[754]
I'll be creating other useful spreadsheets and
showing how to add features to this Gantt Chart
[759]
So if you want more, remember to
subscribe and tell us what you liked.
Most Recent Videos:
You can go back to the homepage right here: Homepage





