Paul
Paul

Reputation: 69

Count Weekend Days Between Range Formula

I need a count of weekend days (WEEKDAY1 and WEEKDAY7) that occur within a range. There are three excellent posts here on how to do it VBA style, but this is not an option here. The range will not be more than a few weeks, but can cross the end of any given month.

An example: 21 September 2015 to 10 October 2015 (inclusive) Count of weekend days = 5

Upvotes: 0

Views: 1090

Answers (2)

MikeG
MikeG

Reputation: 85

If your dates are in Column A1:A30, I would use a helper column containing

B1 = Weekday(A1,1)

Copied all the way down to B30. I would then use

Countif(A1:A30,1) + Countif(A1:A30,7)

to check for Sunday and Saturday.

Upvotes: 2

user4039065
user4039065

Reputation:

The NETWORKDAYS or NETWORKDAYS.INTL function will give you the number of non-weekend days. Subtract this from the total days.

=(B1-A1)-NETWORKDAYS.INTL(A1, B1,1)+1

Upvotes: 1

Related Questions