Re: Calculating number of Saturday's in a Year
- From: JE McGimpsey <jemcgimpsey@xxxxxxxx>
- Date: Mon, 19 Dec 2005 13:09:44 -0700
Using DAYS(360) will potentially undercount your Saturdays (as well as
being less efficient by a function call). Better:
=SUMPRODUCT(--(WEEKDAY(A1+ROW(INDIRECT("1:"&(A2-A1))))=7))
Whether to subtract one or not depends on the OP's interpretation of
"between" (i.e., exclusive or inclusive). For instance, if the period
ends on a Saturday, using
=SUMPRODUCT(--(WEEKDAY(A1+ROW(INDIRECT("1:"&(A2-A1)-1)))=7))
will ignore the last day, where the first formula will include it.
In article <06F26D31-D066-4413-B2C8-964248E0EE27@xxxxxxxxxxxxx>,
"David Billigmeier" <dtbill21@xxxxxxxxxxx> wrote:
> Assume your first date is in A1 (4/1/2005) and your second date is in A2
> (3/31/2006), use the following formula (Note, this is an array formula so
> confirm it with CTRL+SHIFT+ENTER).
>
> =SUM(--(WEEKDAY(A1+ROW(INDIRECT("1:"&DAYS360(A1,A2)))-1)=7))
>
> Change the reference of A1 and A2 to fit your data.
.
- References:
- Calculating number of Saturday's in a Year
- From: ecurns
- Calculating number of Saturday's in a Year
- Prev by Date: Re: Calculating number of Saturday's in a Year
- Next by Date: Re: Excel Workbook?
- Previous by thread: Re: Calculating number of Saturday's in a Year
- Next by thread: Re: I cannot seem to print certain workbooks from Excel 2003
- Index(es):
Relevant Pages
|