+ Reply to Thread
Results 1 to 3 of 3

Calculating the number of days within differing years

  1. #1
    Registered User
    Join Date
    06-16-2009
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    1

    Unhappy Calculating the number of days within differing years

    Summary: I first calculate the number of days between two dates (a Start and a Finish date) using DATEDIF.

    I then need to show those days split (in a series of cells to the right) into different financial years (which each run 1st Apr to 31st Mar) according to which ever the Start and Finish dates fall within.

    A number of days could therefore all be within a single year, or may have a few from the tail end of Yr1, be all of Yr2, be all of Yr 3 and finally a few from the start of Yr4.

    I have tried and failed badly to sort this out using nested IF Functions DAYS360 and DATEDIF.

    If anyone could be of asistance with this I'd be very grateful. Thanks, MarG.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Calculating the number of days within differing years

    Welcome to the forum, Aardvark.

    Post a workbook.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Calculating the number of days within differing years

    If you have start date in A3 and end date in B3 then this formula will give the days in the year

    =MAX(0,MIN($B3,D$2)-MAX($A3,D$1)+1)

    Where D1 is the start date of the year and D2 the end date. You can list all the years and copy the formula across and down as necessary, see attached.

    Note: the formula counts both start and end date (you can calculate differently if you want)
    Attached Files Attached Files

+ 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