A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Number of days falling in various years



 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old March 29th, 2010, 08:02 PM posted to microsoft.public.excel.newusers
Revenue
external usenet poster
 
Posts: 2
Default Number of days falling in various years

I am starting two dates in my example. The first is 6/20/02 and the
second is 1/15/2006. I need to calculate in separate columns for years
2001 through 2006 the number of day in this year that are between
these two dates. For example, in 2001, the answer is -, in 2002, the
answer is 194, and in years 2003 through 2005, the answer is 365, and
finally in 2006, the answer is 15 days.


The formula below almost works, but 2001 it came up with a negative
number.

=MIN(IF(DATE(O1,12,31)$K$2,0,MIN((DATE(O1,12,31)-$K$2),
365)),IF(DATE(O1,12,31)$J$2,MIN((DATE(O1,12,31)-$K$2),365),G2-
DATE(O1,1,1)+1))

Surely there is a function to handle this sort of thing.

Thanks,


Bruce
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 06:54 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.