Calc days between two dates and exclude leap year days

  • Thread starter Thread starter scoz
  • Start date Start date
S

scoz

Hi
I need to calculate number of days between two dates, over a period of yrs
and discount the extra day in a leap year!!!!
Any ideas anyone?

Many thanks in advance
 
Hi
I need to calculate number of days between two dates, over a period of yrs
and discount the extra day in a leap year!!!!
Any ideas anyone?

Many thanks in advance


=A2-A1-SUMPRODUCT((MONTH(ROW(
INDIRECT(A1&":"&A2)))=2)*(DAY(ROW(
INDIRECT(A1&":"&A2)))=29))

where

A1: Start Date
A2: End Date
--ron
 
Excellent Ron, Many thanks

Ron Rosenfeld said:
=A2-A1-SUMPRODUCT((MONTH(ROW(
INDIRECT(A1&":"&A2)))=2)*(DAY(ROW(
INDIRECT(A1&":"&A2)))=29))

where

A1: Start Date
A2: End Date
--ron
 
Back
Top