+ Reply to Thread
Results 1 to 7 of 7

Date after a defined period

  1. #1
    Forum Contributor leo73pk's Avatar
    Join Date
    09-28-2006
    Location
    UAE
    MS-Off Ver
    2016, Microsoft 365
    Posts
    294

    Date after a defined period

    I'm working on a sheet wherein in one column i have an agreement date in next column i have the validity period (years) for which agreements are valid in next colum i want a formula to calculate the expiry date of the agreements based on the agreement date and validity period.
    Last edited by leo73pk; 01-17-2011 at 03:29 PM.

  2. #2
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Date after a defined period

    If original date is in A1 try
    Please Login or Register  to view this content.

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Date after a defined period

    The only thing to be aware of re: above is where A1 falls on a leap year (29th will become 1st March if years anything other than 4)

    If you prefer 29th Feb become 28th Feb in the end year where not falling on leap year then given use of XL2007 you could use EDATE

    Please Login or Register  to view this content.
    Using the DATE version - you could subtract one based on value of A1 where necessary.

    Please Login or Register  to view this content.
    though I'm sure there are more elegant methods than the above.

  4. #4
    Forum Contributor leo73pk's Avatar
    Join Date
    09-28-2006
    Location
    UAE
    MS-Off Ver
    2016, Microsoft 365
    Posts
    294

    Re: Date after a defined period

    Thanks both of Your Marvin & Donkeyote,

    @Donkeyote,

    Sir kindly explain a little more about the following part of your formula, enabling me to understand the logic
    Please Login or Register  to view this content.

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Date after a defined period

    It simply multiplies two Boolean outputs. Where both hold True the result of the multiplication will be 1 (TRUE*TRUE) else 0 (FALSE * TRUE or TRUE * FALSE or FALSE * FALSE)

    It is the same as:

    Please Login or Register  to view this content.
    so basically where A1 falls on a leap year and validity_period is anything other than a multiple of 4 we subtract 1 day from original day value (so 29th Feb becomes 28th Feb) else our result would be 1st March

  6. #6
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Date after a defined period

    Quote Originally Posted by leo73pk View Post
    Thanks both of Your Marvin & Donkeyote,
    Glad to know arthurbr translates as Your Marvin somewhere in the world

  7. #7
    Forum Contributor leo73pk's Avatar
    Join Date
    09-28-2006
    Location
    UAE
    MS-Off Ver
    2016, Microsoft 365
    Posts
    294

    Re: Date after a defined period

    THANKS FOR YOUR HELP.

    @ Donkeyote thanks for your explaining my query in detail.

    Regards,

+ 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