codewala

code it

Excel – get week number from date

Task
When we create a time plan – sometimes the client wants to know in which week number the different phases of the project will start or end.

Problem
While creating the time plan had to refer the calendar for the week number.

Solution
Use the in-build excel function TRUNC.

 Syntax

=TRUNC(((StartDate-DATE(YEAR(StartDate),1,0))+6)/7)

where StartDate is the date whose week number is to be returned.

Advertisements

September 6, 2012 Posted by | Excel | 1 Comment