Share via

Excel add 14 days to date in Col J:2

SteveD 145 Reputation points
2026-02-20T19:35:07.0266667+00:00

Hello from Steve

In Column J:2 I have 10-February-2026

Objective please is to have a macro button that when pushed it adds 14 days

Which gives me 24-February-2026

I thank you


Mod moved from : Microsoft 365 and Office | Excel | For home | Windows

Developer technologies | Visual Basic for Applications
0 comments No comments

2 answers

Sort by: Most helpful
  1. Barry Schwarz 5,356 Reputation points
    2026-02-20T22:36:15.07+00:00

    The following macro will add 14 days to J2

    Option Explicit
    Sub Date_Add_14()
    Range("J2").Value = Range("J2").Value + 14
    End Sub
    
    

    If you want to select the cell to be incremented instead of always using J2, change both instances of the Range(...) expression to Selection.

    1 person found this answer helpful.
    0 comments No comments

  2. Q&A Assist
    2026-02-20T19:35:15.5233333+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    To create a macro in Excel that adds 14 days to the date in cell J2 when a button is pressed, you can use the following VBA code:

    1. Open Excel and press ALT + F11 to open the Visual Basic for Applications (VBA) editor.
    2. In the VBA editor, insert a new module by right-clicking on any of the items in the Project Explorer and selecting Insert > Module.
    3. Copy and paste the following code into the module:
    Sub AddDays()
        Dim currentDate As Date
        Dim newDate As Date
    
        ' Get the date from cell J2
        currentDate = Range("J2").Value
        ' Add 14 days
        newDate = DateAdd("d", 14, currentDate)
        ' Output the new date back to cell J2
        Range("J2").Value = newDate
    End Sub
    
    1. Close the VBA editor and return to your Excel sheet.
    2. To create a button, go to the Developer tab, click on Insert, and choose a Button (Form Control). Draw the button on your sheet.
    3. When prompted to assign a macro, select AddDays and click OK.
    4. Now, when you click the button, it will add 14 days to the date in cell J2.

    This macro uses the DateAdd function to add days to a specified date, which is a common approach in VBA for manipulating dates.


    References:

    1 person found this answer helpful.

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.