add 3 month to a date

  • Hi all,

    I am currently working on a worksheet, where there are 4 columns. Case ID#(A), Case Name(B), AppDate(C), and FollowUpDate(D). I need a VBA code that will return a date for 3 months after the date found in the AppDate column, in the FollowUpDate column.

    I've tried many different suggestions, and nothing has worked.

    If anyone can help me get out of this jam, it would be very much appreciated.

    Thanks in advance.

  • Maybe this

  • If you are looking for a non-VBA solution, a formula in column D would provide the same result.

    For example, if your first AppDate is is cell C2 then the formula for FollowUpDate in cell D2 would be =DATE(YEAR(C2),MONTH(C2)+3,DAY(C2))
    You can then copy this formula down the column.

  • I tested based upon your first post and it worked for me. Suggest you upload to this site a sample workbook and make sure that my understanding and yours are the same. Also when you put the code into your workbook, did you use the following steps.

    Standard Module
    How to install your new code
    Copy the Excel VBA code
    Select the workbook in which you want to store the Excel VBA code
    Press Alt+F11 to open the Visual Basic Editor
    Choose Insert > Module
    Edit > Paste the macro into the module that appeared
    Close the VBEditor
    Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)

    To run the Excel VBA code:
    Press Alt-F8 to open the macro list
    Select a macro in the list
    Click the Run button

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!