+ Reply to Thread
Results 1 to 3 of 3

Date Function

  1. #1
    Registered User
    Join Date
    10-24-2007
    Posts
    9

    Date Function

    I'm looking to automatically figure out the last day of the current month from a cell that has a date it in it. Example: A1 = 02/14/08 and I want B1 to automatically calculater 02/29/08. (leap year). Thanks

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Try:

    =EOMONTH(A1,0)

    this is an Analysis Toolpak function... Tools|Addins >> Analysis Toolpak
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675
    Without Analysis ToolPak the standard approach is

    =DATE(YEAR(A1),MONTH(A1)+1,0)

    or if you want something a little less transparent but a little more exotic try

    =A1-DAY(A1)+32-DAY(A1-DAY(A1)+32)

+ 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