+ Reply to Thread
Results 1 to 4 of 4

Need a function or formulae that will return the current date + 1

  1. #1
    scott56hannah
    Guest

    Need a function or formulae that will return the current date + 1

    Would also be helpful if there were similar formulae that would provide the
    ability to either add 1 day or add 1 year to the current date......Of course
    it needs to take into account leap years and other problems.....can anyone
    help

  2. #2
    Valued Forum Contributor Excelenator's Avatar
    Join Date
    07-25-2006
    Location
    Wantagh, NY
    Posts
    333
    To return the Current Date + 1 Day use

    =Today() + 1

    To return the Current Date + 1 Year

    =DATE(YEAR(TODAY()) +1,MONTH(TODAY()),DAY(TODAY()))

    You mention that it has to account for leap years. What do you mean by that? If you replace the +1 with +3 in the formula above to add three years to today (and thus cross over 2008 which is the next leap year) the date returned is 7/27/09. Is this not the answer you are looking for?


    Quote Originally Posted by scott56hannah
    Would also be helpful if there were similar formulae that would provide the
    ability to either add 1 day or add 1 year to the current date......Of course
    it needs to take into account leap years and other problems.....can anyone
    help
    ---------------------------------------------------
    ONLY APPLIES TO VBA RESPONSES WHERE APPROPRIATE
    To insert code into the VBE (Visual Basic Editor)
    1. Copy the code.
    2. Open workbook to paste code into.
    3. Right click any worksheet tab, select View Code
    4. VBE (Visual Basic Editor) opens to that sheets object
    5. You may change to another sheets object or the This Workbook object by double clicking it in the Project window
    6. In the blank space below the word "General" paste the copied code.

  3. #3
    Elkar
    Guest

    RE: Need a function or formulae that will return the current date + 1

    The formula:

    =TODAY()+1

    will add 1 day to today's date.

    You could also use:

    =DATE(YEAR(TODAY())+3,MONTH(TODAY())+4,DAY(TODAY())+2)

    This will add 3 years, 4 months and 2 days to today's date.

    HTH,
    Elkar



    "scott56hannah" wrote:

    > Would also be helpful if there were similar formulae that would provide the
    > ability to either add 1 day or add 1 year to the current date......Of course
    > it needs to take into account leap years and other problems.....can anyone
    > help


  4. #4
    Forum Contributor
    Join Date
    10-14-2004
    Location
    San Diego, CA
    Posts
    213
    Scott56hannah:

    Leap Years should not be a problem that I can see, and you should specify in more detail when you say, “other problems”. However, this formula will determine if it is a leap year or not.

    =IF(MOD(YEAR(A1),4)=0,"YES","NO")

    Since Feb. 29th can’t exist in Feb. unless it is a Leap Year, Excel will automatically accommodate by your adding 1 day to make it either the 29th or the 01st of Mar. Use this formula.

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

    Matt

+ 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