Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default calulate the number of leapdays between two dates?

can this be do this easily
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default calulate the number of leapdays between two dates?

On Wed, 5 May 2010 03:03:01 -0700, leapterry <leapterry
@discussions.microsoft.com wrote:

can this be do this easily


Here's one way:

=SUMPRODUCT(--(TEXT(ROW(INDIRECT(StartDt&":"&EndDt)),"mmdd")="02 29"))

StartDt and EndDt refer to two cells which contain the starting and ending date
of the range you are checking.
--ron
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 834
Default calulate the number of leapdays between two dates?

Try this

=SUMPRODUCT(--(TEXT(ROW(INDIRECT(A1&":"&A2)),"dd-mmm")="29-Feb"))

--

HTH

Bob

"leapterry" <leapterry @discussions.microsoft.com wrote in message
...
can this be do this easily



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default calulate the number of leapdays between two dates?

With dates in A1 and A2:

=A2-A1-(DATE(2003,MONTH(A2),DAY(A2))
-DATE(2003,MONTH(A1),DAY(A1)))-365*(YEAR(A2)-YEAR(A1))

format the cell as Integer

So if A1 and A2 contain:
1/18/1945
7/7/2007

the formula will return 15

See J.E. McGimpsey's reply in

http://groups.google.com/group/micro...days%22+excel#


--
Gary''s Student - gsnu201002


"leapterry" wrote:

can this be do this easily

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
calulate working hours and minutes between 2 dates and times nigeo Excel Discussion (Misc queries) 10 August 12th 08 10:08 PM
Excel Formula to calulate number of days passed from date to date K. Mack Excel Discussion (Misc queries) 8 January 4th 07 11:27 PM
how to calulate time in hours cbetween two different dates? shonkoo Excel Worksheet Functions 3 October 30th 05 03:30 AM
Calculating number of days between two dates that fall between two other dates [email protected] Excel Discussion (Misc queries) 5 October 26th 05 06:18 PM
how to calulate time unique New Users to Excel 1 July 5th 05 05:26 PM


All times are GMT +1. The time now is 02:21 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"