+ Reply to Thread
Results 1 to 10 of 10

working with dates in formulas

  1. #1
    Registered User
    Join Date
    02-20-2014
    Location
    Belgium
    MS-Off Ver
    Excel 2010
    Posts
    36

    working with dates in formulas

    Hi,
    I have a certain date, e.g. 25/03/2011 in column A. In column B, I would like to have a formula that gives the same date, e.g. 5 years later. In the example, it would be 25/03/2016.
    In column C, I would like to have a formula that gives the first of January of the year following the year in column B. So that would be 01/01/2017.

    How do I do this ?
    Thanks !
    Last edited by jokkebal; 07-09-2019 at 09:04 AM. Reason: Solved by several great people

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,893

    Re: working with dates in formulas

    First part:

    =EDATE(A1,60)

    second part:

    =DATE(YEAR(A1)+6,1,1)

    you may need ; not , as the separator
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,198

    Re: working with dates in formulas

    =EDATE(a1,60) for the date in 5 years time in b1
    =DATE(YEAR(b1)+1,1,1) in c1
    Last edited by davsth; 07-09-2019 at 07:35 AM.

  4. #4
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,404

    Re: working with dates in formulas

    Assuming your original date is in A2, put this in B2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    then this in C2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.



    Edit: I obviously type more slowly than the others...
    Regards,
    Aardigspook

    I recently started a new job so am a bit busy and may not reply quickly. Sorry - it's not personal - I will reply eventually.
    If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark this Thread as Solved'.
    If you use commas as your decimal separator (1,23 instead of 1.23) then please replace commas with semi-colons in your formulae.
    You don't need to give me rep if I helped, but a thank-you is nice.

  5. #5
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,767

    Re: working with dates in formulas

    In A1 Cell
    25-03-2011


    In B1 Cell
    =EDATE(A1,60)


    In C1 Cell
    =EOMONTH(EDATE(B1,12),-MONTH(B1))+1


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  6. #6
    Valued Forum Contributor
    Join Date
    05-07-2014
    Location
    India
    MS-Off Ver
    MS Office 365
    Posts
    313

    Re: working with dates in formulas

    Hi Jokkebal,

    1st Formula :- In order to get the date of 5 years later, use this formula =DATE(YEAR(A4)+5,MONTH(A4),DAY(A4))

    2nd Formula:- To get the date of 1st January for following year, use this formula =DATE(YEAR(B4)+1,1,1)

    Instruction:- If you have date in A column then use 1st formula in column B and 2nd formula in column C.
    Thanks
    Nisha Dhawan


    If you like my answer please click on * Add Reputation
    "If you can dream it, You can do it "

  7. #7
    Registered User
    Join Date
    02-20-2014
    Location
    Belgium
    MS-Off Ver
    Excel 2010
    Posts
    36

    Re: working with dates in formulas

    it works, thanks to all !

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    79,366

    Re: working with dates in formulas

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  9. #9
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,893

    Re: working with dates in formulas

    you're welcome!!

  10. #10
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,404

    Re: working with dates in formulas

    You're welcome, glad we could help and thanks for the rep.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Formula to return the 'earliest' and 'latest' dates from a list of dates is not working
    By Hawkmoth1 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 03-21-2017, 07:14 AM
  2. [SOLVED] some formulas using dates are not working ranges named using counta
    By jpbisani in forum Excel General
    Replies: 4
    Last Post: 04-16-2015, 04:43 AM
  3. Working with dates and formulas
    By LionHeartofGold in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-19-2013, 06:24 PM
  4. Excel formulas calculate working hours bet two dates with criteria
    By breadwinner in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-02-2013, 01:28 AM
  5. Replies: 18
    Last Post: 03-24-2013, 04:20 PM
  6. Replies: 9
    Last Post: 03-08-2013, 11:50 AM
  7. Formulas not working with double digit dates
    By ckk403 in forum Excel General
    Replies: 13
    Last Post: 12-30-2010, 10:36 AM

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