Saturday, December 4, 2010

Start Date of A Week

I had to create a report depicting no. of issues arrived weekly. Each day issues were reported. Based on date I had to find the start date of a week. Here is the formula to find start date of a week.

Suppose Date is in cell “B1″ then formula to find start date of week is =IF(WEEKDAY(B1,2)=1,B1,B1-(WEEKDAY(B1,2)-1))after posting formula if you see date in number format then right click-> select “Format Cells” -> select “Date”. It will display start date of a week for selected date.

In above case “Monday” is considered as start date of a week, if you want to choose other day as start day of a week then change the number in weekday function i.e. “Weekday(B1,1)” or “Weekday(B1,2)” or “Weekday(B1,3)”. 1 is assigned for Sunday, 2 is assigned for Monday and 3 is assigned for Tuesday. After 3 function does not accept return type.

~ Sangram

No comments:

Post a Comment