LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
 
Posts: n/a
Default working out quarters (three-month periods) between two dates

Hi,

I've been working on a function to calculate how many quarters there
are between two dates - but not the standard business quarters -
effectively what I am trying to work out is the number of complete
three month periods between two dates.

Example:

Start Date: 27/02/2006
End Date: 19/04/2013

I need to calculate how many complete three month periods have passed
between the two dates - this is not as simple as converting the dates
to a timestamp, defining a year as 60 * 60 * 24 * 365.25 seconds, then
dividing by 4, as the length of months do differ, as henceforth
quarters will differ.

[while the above would work in a lot of cases, it would sometimes fall
due to different lengths of months].

i.e. if you adjust the start dates:

Quarter 1: 1 Feb - 30 April - 89 days
Quarter 2: 1 May - 31 July - 92 days


Therefore, I am trying to figure out how many entire three month
periods has passed between the two dates.

I'm sure this is no specific function that will do, but can it be done
with a combination of other existing function - at the moment it looks
like I'm going to have to write a VBA macro to parse the dates using
lots of IF..ELSE statements.

Thanks
Neil.

 
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
Count number of cells of a particular month in a column of dates Gohan51D Excel Discussion (Misc queries) 9 March 15th 06 07:21 PM
Dates - Several Days In a month to month only Andy_Pimp Excel Discussion (Misc queries) 1 February 28th 06 11:11 AM
VLOOKUP & Dates: Why is this Formula working? Ali Excel Worksheet Functions 1 January 18th 06 01:37 PM
countdown dates by month shopaholic Excel Worksheet Functions 2 November 28th 05 06:43 AM
How to calculate the day before last two working day of each month Angus Excel Discussion (Misc queries) 1 June 29th 05 12:22 PM


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