+ Reply to Thread
Results 1 to 10 of 10

Calculating number of days in leap year

  1. #1
    Forum Contributor
    Join Date
    03-15-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    149

    Calculating number of days in leap year

    I am trying to Calculating number of days in leap year

    B3=01/01/2012
    B4=12/31/2012

    =((MONTH(B4)&"/")&DAY(B4))-((MONTH(B3)&"/")&DAY(B3))

    But output is 365 for 01/01/2012 – 12/31/2012

    Should be 366 bez leap year

    PS: MM/DD/YY format

    Pls help …

    Thanks !

  2. #2
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: Calculating number of days in leap year

    Hello, just simply enter

    =B4-B3+1

    Then format the cell as General or Number.
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  3. #3
    Forum Contributor
    Join Date
    03-15-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    149

    Re: Calculating number of days in leap year

    perfect
    thanks!

  4. #4
    Forum Contributor
    Join Date
    01-28-2010
    Location
    Riverside, CA
    MS-Off Ver
    Excel 2010
    Posts
    132

    Re: Calculating number of days in leap year

    Excel is calculating it right, for example when you take 12/31/11-01/01/11 = 364.

    when you convert the date to a value (general format) you will see that it will subtract the date of 01/01/12 out of the number of days, so you will need to add 1 to make up for the difference. Hope that clears it up.
    Happy Excel'ing!

  5. #5
    Forum Contributor
    Join Date
    03-15-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    149

    Re: Calculating number of days in leap year

    Thanks to all

  6. #6
    Forum Contributor darknation144's Avatar
    Join Date
    01-24-2012
    Location
    London
    MS-Off Ver
    Microsoft Excel 365 MSO
    Posts
    555

    Re: Calculating number of days in leap year

    To get 366 you should compare 1/1/13 - 1/1/12 that give you 366. 1/1/14 - 1/1/13 gives you 365.

  7. #7
    Forum Contributor
    Join Date
    03-15-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    149

    Re: Calculating number of days in leap year

    Attached is the interest calculation. This gives me a problem on the Leap years. Calculated Value(D4&D5),Combined(I4&I5) days (J4&J5) and year(H4&H5). Any ideas ??? In order to replace the 365 in the formula on my spreadsheet? Need calculate 365 and 366

    Thanks.
    Attached Files Attached Files

  8. #8
    Forum Contributor darknation144's Avatar
    Join Date
    01-24-2012
    Location
    London
    MS-Off Ver
    Microsoft Excel 365 MSO
    Posts
    555

    Re: Calculating number of days in leap year

    NAV Calculator.xls

    Does this do what you want it to?

  9. #9
    Forum Contributor
    Join Date
    03-15-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    149

    Re: Calculating number of days in leap year

    need calculate Interest Earned and Calculated Value on leap year and normal calendar year(365 & 366) need a combined formula
    Last edited by raw_geek; 03-16-2012 at 11:46 AM.

  10. #10
    Forum Contributor
    Join Date
    03-15-2012
    Location
    Chicago, IL
    MS-Off Ver
    Excel 2010
    Posts
    149

    Re: Calculating number of days in leap year

    Calculated Value= J4/365 (ignoring leap years, which have 366 days)

    Year = (YEAR(B4)-YEAR(B3))*365(ignoring leap years)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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