+ Reply to Thread
Results 1 to 3 of 3

Date return based on the earlier of 2 other dates

  1. #1
    Registered User
    Join Date
    05-13-2011
    Location
    Bournemouth
    MS-Off Ver
    Excel 2003
    Posts
    44

    Date return based on the earlier of 2 other dates

    Morning all

    I don't know if this can be done, but here goes:

    I have a set of 2 annual check dates that are manually entered. Through the year, the person needs to have regular training every 3, 6 and 9 months from that date. What I need is that the cells showing the training dates needs to adjust and display the correct date for the check that is first.

    So in the attached example I need the dates in columns E,G and I to look at columns B and C, work out which date comes soonest and then display the correct info in the empty cells. I have manually entered the date so you can see what I need displayed.

    Looking at B5 and C5, the date in E5 would need to work out that B5 comes first so it would then return 9 months from that date, G5 would give a date 6 months prior to that date and I5 would give a date 3 months prior to that date.

    What this would mean is that when this person has their check on 1 August, and we enter the date for their check next year, the 3 training columns will let us know what dates their next batch of training is due.
    Attached Files Attached Files
    Last edited by CTCoperations; 07-10-2012 at 02:07 AM.

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Date return based on the earlier of 2 other dates

    Hi CTC operations,

    You can use below formula:-
    =DATE(YEAR(MIN($B5,$C5)),MONTH(MIN($B5,$C5))+E$2,DAY(MIN($B5,$C5)))
    where E2 is just a reference to 3,6,9

    see attached file;- sample dates.xls

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Date return based on the earlier of 2 other dates

    hi CTCoperations, i remember the last post you do not have EOMONTH available? so did you do the add-in? here's what you can use if you did:
    =EOMONTH(MIN($B5:$C5),-10)+1

    =EOMONTH(MIN($B5:$C5),-7)+1

    =EOMONTH(MIN($B5:$C5),-4)+1

    and if you havent done the add-in, here's how it can be done:
    http://chandoo.org/forums/topic/exce...-eomonth-v2007
    havent tried it myself because i do not have Excel 2003. hope it works for you
    Last edited by benishiryo; 07-09-2012 at 05:12 AM. Reason: wrong input

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

+ 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