Excluding leap days in a formula
On Thu, 11 Dec 2008 13:10:12 -0500, Ron Rosenfeld
wrote:
On Thu, 11 Dec 2008 05:28:06 -0800, PMBO
wrote:
Ron -
I'm using a simple datedif =DATEDIF(A1,A2,"d")
This should work:
=SUMPRODUCT(--(((MONTH(ROW(INDIRECT(StartDt&":"&EndDt)))<2)+
(DAY(ROW(INDIRECT(StartDt&":"&EndDt)))<29))0) )
--ron
A quick note -- the above formula returns an inclusive count. You should
probably subtract one (1) to obtain the result you really want.
--ron
|