+ Reply to Thread
Results 1 to 6 of 6

Number of days based on 365 day year

Hybrid View

  1. #1
    Registered User
    Join Date
    04-16-2013
    Location
    San Francisco, California
    MS-Off Ver
    Excel 2003
    Posts
    2

    Number of days based on 365 day year

    Hello,

    Probably a simple question, but I'm trying to calculate the number of days between two dates based on all years having 365 days (excluding +1 leap year days)
    And I can't quite seem to figure it out
    Thanks

  2. #2
    Forum Contributor
    Join Date
    03-04-2013
    Location
    Europe
    MS-Off Ver
    Office 365 ProPlus
    Posts
    147

    Re: Number of days based on 365 day year

    Excel is smart enough to just let you subtract the dates with each other. So

    # of days between date 1 & 2 = date 2 - date 1

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Number of days based on 365 day year

    Not so easy. Why don't you want to include leap days? That would be much simplier
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Number of days based on 365 day year

    While I "whole heartedly" agree with the question : Why do you want to exclude leap year days?
    I just can't see any logical reason to do that..

    but anyway, this will do it.

    =SUMPRODUCT(--(TEXT(ROW(INDIRECT(A1&":"&A2)),"mmmdd")<>"Feb29"))-1
    A1=Start Date
    A2=End Date

    Remove the -1 if Both Start and End Dates should be INCLUDED in the count.
    Last edited by Jonmo1; 04-16-2013 at 12:49 PM.

  5. #5
    Registered User
    Join Date
    04-16-2013
    Location
    San Francisco, California
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Number of days based on 365 day year

    Thanks Jonmo1, that did the trick. Sadly, I need to exclude leap year days because I'm trying to mimic an applications calculation for ARR that assumes all years at 365 days. And just subtracting one date from another doesn't do it.
    Thanks again

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Number of days based on 365 day year

    Great, glad to help.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1