#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default entry and exit dates

Hi: I have two issues somehow related.

1. I am trying to compute the number of days per quarter between an entry
and an exit date. The entry date can be anywhere between 1/1/2001 and
12/31/2005, and so does the exit date.

2. For the same entry and exit dates, I am trying to compute the total
number of days that fall in 2004 and the total that fall in 2005.

Thank you in advance.


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,696
Default entry and exit dates

Not quite sure what you're needing for part 1. Are you looking for number of
days? that's:
=Days360(start date,end date)

As far as the 2nd part, you should be able to do:

=min(end value,12/31/2004)-max(start value,1/1/2004) to get your 2004 number
of days. Format as number
=min(end value,12/31/2005)-max(start value,1/1/2005) to get your 2004 number
of days. Format as number


"refstone" wrote:

Hi: I have two issues somehow related.

1. I am trying to compute the number of days per quarter between an entry
and an exit date. The entry date can be anywhere between 1/1/2001 and
12/31/2005, and so does the exit date.

2. For the same entry and exit dates, I am trying to compute the total
number of days that fall in 2004 and the total that fall in 2005.

Thank you in advance.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default entry and exit dates

I'm assuming they're calendar quarters:

Jan - Mar = 1
Apr - Jun = 2
Jul - Sep = 3
Oct - Dec = 4

A2 = entry date
B2 = exit date

1Q: =SUMPRODUCT(--(MONTH(ROW(INDIRECT(A$2&":"&B$2)))={1,2,3}))
2Q: =SUMPRODUCT(--(MONTH(ROW(INDIRECT(A$2&":"&B$2)))={4,5,6}))
3Q: =SUMPRODUCT(--(MONTH(ROW(INDIRECT(A$2&":"&B$2)))={7,8,9}))
4Q: =SUMPRODUCT(--(MONTH(ROW(INDIRECT(A$2&":"&B$2)))={10,11,12}))

For the days in the years:

A10 = 2004
A11 = 2005

B10: =SUMPRODUCT(--(YEAR(ROW(INDIRECT(A$2&":"&B$2)))=A10))

Copy down to B11

Biff

"refstone" wrote in message
...
Hi: I have two issues somehow related.

1. I am trying to compute the number of days per quarter between an entry
and an exit date. The entry date can be anywhere between 1/1/2001 and
12/31/2005, and so does the exit date.

2. For the same entry and exit dates, I am trying to compute the total
number of days that fall in 2004 and the total that fall in 2005.

Thank you in advance.




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
Can anyone povide step by step instructions on how to do the follo Daniel Bunt Excel Discussion (Misc queries) 6 January 26th 07 12:58 PM
How to format cells in upercase entry John Calder New Users to Excel 1 August 10th 06 03:51 AM
enable automatic refresh Vass Excel Worksheet Functions 2 March 11th 06 04:36 AM
Validate MsgBox Entry to Data in Cells David Excel Discussion (Misc queries) 13 December 21st 05 10:31 PM
How do I change cell color upon entry, and exit? Deb Excel Worksheet Functions 1 August 4th 05 09:48 AM


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