I have a formula from MS Excel 2007 which returns the workweek of a certain date within a certain month.
B1 = IF(AND(WEEKDAY(A2,1)<>1,A2=DATE(YEAR(A2),MONT
Don't calculate, query. See:
Why should I consider using an auxiliary calendar table?
A calendar table can make it much easier to develop solutions around any business model which involves dates. Last I checked, this encompasses pretty much any business model you can think of, to some degree. Constant problems that end up requiring verbose, complicated and inefficient methods include the following questions:
- How many business days between x and y?
- What are all of the dates between the second Tuesday of March and the first Friday in April?
- On what date should I expect this shipment to arrive?
- What were the dates of all the Fridays in this quarter?
- ...