Results 1 to 2 of 2
  1. #1
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    3 Useful date calculations! (Excel 2000 >)

    The formula below returns the day of the year for a date in cell A1:
    =A1-DATE(YEAR(A1),1,0)
    NB: Excel automatically formats the cell as a date, so change the number format to another option (like General).

    To calculate the number of days remaining in the year (assuming that the date is in cell A1), use the following formula:
    =DATE(YEAR(A1),12,31)-A1

    If cell A1 contains a date, this formula will return the number of days in the month:
    =DAY(DATE(YEAR(A1),MONTH(A1)+1,1)-1).
    Regards,
    Rudi

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: 3 Useful date calculations! (Excel 2000 >)

    A slightly shorter version of the third one (number of days in the month) is

    <code>=DAY(DATE(YEAR(A1),MONTH(A1)+1,0))</code>

Posting Permissions

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