+ Reply to Thread
Results 1 to 9 of 9

calculation of expiration date

  1. #1
    Registered User
    Join Date
    04-06-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    15

    calculation of expiration date

    I am trying to create a policy monitoring worksheet wherein when i enter an initiating date say in column A2 the expiration date (which is every 2 years) will automatically enter in column C2. However, if a policy has just renewed, the initiating date will still be in A2 and the renewal date will be entered in column B2. Automatically the computer calculates the expiration date based on the date entered in column B2.

    Can you help me with this.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: calculation of expiration date

    try....

    =if(B2="",A2+730,B2+730)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Valued Forum Contributor rollis13's Avatar
    Join Date
    01-26-2012
    Location
    Cordenons
    MS-Off Ver
    Excel 2016 32bit - Win 11
    Posts
    917

    Re: calculation of expiration date

    Maybe something like this in C2:

    =IF(B2="",DATE(YEAR(A2)+2,MONTH(A2),DAY(A2)),DATE(YEAR(B2)+2,MONTH(B2),DAY(B2)))

  4. #4
    Registered User
    Join Date
    04-14-2012
    Location
    Indonesia
    MS-Off Ver
    Excel 2010
    Posts
    1

    Re: calculation of expiration date

    are you mean countdown time?

  5. #5
    Registered User
    Join Date
    04-06-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: calculation of expiration date

    Thank you, FDibbins, it worked on my worksheet. I have a new argument, however. Is it possible to format the whole column C2 with this formula? I tried it in the conditional formatting, but failed.

  6. #6
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: calculation of expiration date

    yes, its a simple formula, you should be able to just copy it down to wherever you need it?

    If you want to add conditional formating (to change cel color for instance) let me know and we can work on that

  7. #7
    Registered User
    Join Date
    04-06-2012
    Location
    Philippines
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: calculation of expiration date

    Thank you so much, FDibbins.

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: calculation of expiration date

    Glad to help, shout if you need anything else. It would be great if you could add to my reputation by clicking on the star below

  9. #9
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    Office 2021
    Posts
    2,237

    Re: calculation of expiration date

    So if you are using 730 what is the required output in leap years?

    eg: If initial date is 1/1/2011 what is the required expiry date, 31-Dec-12 or 1-Jan-13? If the answer is 1-Jan-13 try with EDATE

    =EDATE(IF(B2="",A2,B2),24)
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

+ 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