# of Days in a Year

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to tell Excel (in VB or otherwise) to calculate the difference
between 2 dates based solely upon 365 days a year, ignoring whether it is a
leap year or not? I researched various VB/Excel sites and the internet, and
couldn't find an answer to this.
 
Could you work out a formula or algorithm to do that - I would guess you
could.

Is there a built in function that does it. No.

Are you asking what the algorithm would be? Define what the answer is? You
would the number of days minus any leap days?
 
Don and Tom:
Tried Don's method and unfortunately it doesn't hold true in all scenarios,
but it was an excellent suggestion. Yes, I'm looking for some type of
formula, which I will eventually make into a custom function in VB. I have 2
dates; they could be in the same year or in different years. Date360 and add
5 days for each year is essentially what I'm trying to do; i.e., have a
formula that calculates strictly based upon 365 days a year....not 360 and
not the normal way of calculating which includes leap year consideration.
The formulas I've tried calculate correctly in some scenarios but not in
others; for example, one formula may work if both the start and end dates are
in leap years, but won't if the start date is in a leap year and the end date
is not; sometimes I can't figure out any rhyme or reason to why one formula
works/doesn't work. I tried calculating the number of full years * 365, then
the # of days from 1/1/xx to the start date (ignoring the extra leap day if
applicable), then the # of days from the end date to 12/31/xx (ignoring the
extra leap day if applicable) and adding them all together, but that was
really ugly and I couldn't get it to work either. I just can't seem to get
my brain around this.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top