Friday, June 8, 2012

Calculate Business days - SharePoint List calculated column


The following calculated column formula calculates business excluding weekends, based on start date and end date columns in a list.

=IF(AND((WEEKDAY(To,2))<(WEEKDAY(From,2)),((WEEKDAY(From,2))-(WEEKDAY(To,2)))>1),(((DATEDIF(From,To,"D")+1))-(FLOOR((DATEDIF(From,To,"D")+1)/7,1)*2)-2),(((DATEDIF(From,To,"D")+1))-(FLOOR((DATEDIF(From,To,"D")+1)/7,1)*2)))

From is the start date column name here and To is the end date.

No comments: