Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default Calc days between two dates and exclude leap year days

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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,393
Default Calc days between two dates and exclude leap year days

Visit www.cpearson.com and see what Chip does with the undocumented DATEDIF
function. Not sure if he 'discounts' leap year.
best wishes

--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"scoz" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default Calc days between two dates and exclude leap year days

Many thanks Bernard, I'll have a look now

"Bernard Liengme" wrote:

Visit www.cpearson.com and see what Chip does with the undocumented DATEDIF
function. Not sure if he 'discounts' leap year.
best wishes

--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"scoz" wrote in message
...
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




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Calc days between two dates and exclude leap year days

On Fri, 23 Nov 2007 05:02:18 -0800, scoz
wrote:

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
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10
Default Calc days between two dates and exclude leap year days

Excellent Ron, Many thanks

"Ron Rosenfeld" wrote:

On Fri, 23 Nov 2007 05:02:18 -0800, scoz
wrote:

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



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,651
Default Calc days between two dates and exclude leap year days

On Fri, 23 Nov 2007 07:18:00 -0800, scoz
wrote:

Excellent Ron, Many thanks


You're welcome. Glad to help.
--ron
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
Conditional Formatting Dates calculating 10 days and 30 days from a certain date Sioux[_2_] Excel Worksheet Functions 2 October 11th 07 02:04 PM
Calc Prorated Cost based on Specific Days in a Given Month & Year Range (Revisited..) [email protected] Excel Discussion (Misc queries) 8 October 2nd 07 12:15 AM
i have two days and i want the difference in days, months, year maja Excel Worksheet Functions 7 April 22nd 06 01:14 AM
How to calc # of days between two dates in YYYYMMDD in EXCEL. ahsan Excel Discussion (Misc queries) 4 January 24th 06 05:41 PM
Elapsed time Calc...over 30 days long... [email protected] Excel Discussion (Misc queries) 0 December 6th 04 05:27 PM


All times are GMT +1. The time now is 02:10 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"