Re: Date Formula help by Ron
Ron
Fri Mar 14 12:02:44 CDT 2008
On Fri, 14 Mar 2008 09:28:00 -0700, Di <Di @discussions.microsoft.com> wrote:
>I am trying to calculate the number of days in a time period excluding
>Sundays,
>(i.e., 2/29/08 minus 2/23/08 = 5 )
>
>Can anyone help me?
>
>Thanks
>
=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A1&":"&A2)))<>1))
will return a count of all the days from and INCLUDING A1 and A2 that are not
Sundays.
To exclude the starting date, merely subtract 1 from that value:
=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A1&":"&A2)))<>1))-1
--ron