I need to write a formula to count a number of times a day fall within a week. Let me explain, I have a range of dates: for example, 3rd January to 17 January. Excluding the weekends, I need to know how many days falls in the 1 week, 2nd week etc.
Anyone know how I can do this in the most efficient mannger?
Subject: Counting number of days occuring in a week
There is a function called @BusinessDays, but this will only return the number of days in the date range, that are considered to be work days (not in the exclusion list).
Your case is probably a little more tricky. It starts with how you define the beginning of a week …
Subject: Counting number of days occuring in a week
The logic isn’t difficult, but I’d need to know what the output should look like. Where is it going (ie, is this text for a “report”, do you have separate fields for the weeks, do you need a “week beginning…” tag, etc.)?
Subject: RE: Counting number of days occuring in a week
Stan
Thank you for responding. I’d like to put the values in an array. so for example, the task spans over 5 weeks, it might look like this:
3,5,5,5,2
I figured that i could could the business days, determine the number of days in the first week, number of days in the last week then divide the remainder by 5 to get to week total days.