How to show week number columns in a Microsoft Project schedule
There are times when you would like to show the week number of dates in a Microsoft Project schedule, for example, when dealing with supply chain long lead items tasks.
In this tutorial, we are going to use 2 text custom fields to display the week numbers of Start and Finish dates. This tutorial makes the following assumptions:
First day of the week is Sunday
First and last week of the year must have at least 4 days to count as full week
Here are 3 sets of formulas for
Week number with no text prefix (i.e. 10)
Start Week No. = DatePart("ww", [Start], 1 ,2)
Finish Week No. = DatePart("ww", [Finish], 1 ,2)
Week number with the text prefix “week” (i.e. week 10)
Start Week No. = “Week " & DatePart("ww", [Start], 1, 2)
Finish Week No. = “Week " & DatePart("ww", [Finish], 1, 2)
Week number with the prefixes’ year and text “week” (i.e. 2020 week 10)
Start Week No. = IIf(DatePart("y",[Start])>362 And DatePart("ww",[Start],1,2)=1,Year([Start])+1 & " week " & DatePart("ww",[Start],1,2),IIf(DatePart("y",[Start])<4 And DatePart("ww",[Start],1,2)>51,Year([Start])-1 & " week " & DatePart("ww",[Start],1,2),Year([Start]) & " week " & DatePart("ww",[Start],1,2)))
Finish Week No. = IIf(DatePart("y",[Finish])>362 And DatePart("ww",[Finish],1,2)=1,Year([Finish])+1 & " week " & DatePart("ww",[Finish],1,2),IIf(DatePart("y",[Finish])<4 And DatePart("ww",[Finish],1,2)>51,Year([Finish])-1 & " week " & DatePart("ww",[Finish],1,2),Year([Finish]) & " week " & DatePart("ww",[Finish],1,2)))
If you need a step by step guide or an explanation of these 3 sets of formulas, then watch the video below.
For more information about DatePart, check out these references from Microsoft
When all subtasks in Microsoft Project are milestones, the summary task percent complete is always 0% unless all the subtasks are 100%. The workaround in this tutorial will display a % complete based on number of milestones completed.