docs / articles / How to Add Date Picker to Excel Cell

How to Add Date Picker to Excel Cell

Eric Jul 09, 2026 2026-07-09 04:40:47

Ever found yourself wishing you could add a date picker to an Excel cell, making data entry a breeze? You're not alone. Excel, powerful as it is, doesn't natively support date pickers. But don't worry, there are workarounds. Let's explore how to add a date picker to an Excel cell using VBA (Visual Basic for Applications) and a user form.

Excel VBA USERFORMS #25 Date Picker Calendar revealed! Loop through Userforms and Controls  Example
Excel VBA USERFORMS #25 Date Picker Calendar revealed! Loop through Userforms and Controls Example

Before we dive in, ensure you're comfortable with basic Excel and VBA concepts. If not, consider brushing up on these skills. Now, let's get started!

Excel Date Picker - How to Insert? (Step by Step Examples)
Excel Date Picker - How to Insert? (Step by Step Examples)

Setting Up Your Environment

First, you'll need to enable the Developer tab in Excel. This tab houses tools for creating and managing user forms, which we'll use to create our date picker.

How to Add Date Picker Calendar Drop Down in MS Excel (Easy)
How to Add Date Picker Calendar Drop Down in MS Excel (Easy)

To enable the Developer tab, right-click on the Ribbon, select 'Customize the Ribbon', then check the box next to 'Developer'.

Creating a User Form

Calculate days from/before date in Excel
Calculate days from/before date in Excel

Now, let's create a user form. In the Developer tab, click on 'Insert' and select 'UserForm' from the drop-down menu. This will open a blank user form.

Rename the user form by double-clicking on its title bar and typing a new name. For this tutorial, let's call it 'DatePicker'.

Designing the User Form

How to create a drop down list calendar (date picker) in Excel?
How to create a drop down list calendar (date picker) in Excel?

Next, we'll add controls to our user form. From the 'Toolbox' (accessible via the 'Controls' group in the Developer tab), drag and drop a 'Date Picker' control onto the user form. You can resize it as needed.

Rename the Date Picker control to 'dtPicker'. This will make it easier to reference in our VBA code.

Adding VBA Code

How to Add Dates in Excel Automatically (2 Simple Steps)
How to Add Dates in Excel Automatically (2 Simple Steps)

Now, let's add some VBA code to make our date picker functional. Right-click on the user form and select 'View Code'. This will open the VBA editor.

In the VBA editor, you'll see two sections: 'UserForm_Initialize' and 'UserForm_Terminate'. We'll add our code to the 'UserForm_Initialize' section.

Excel Date Picker Tool - Contextures Blog
Excel Date Picker Tool - Contextures Blog
Use This Free Excel Date Picker to Enter Dates on Worksheet
Use This Free Excel Date Picker to Enter Dates on Worksheet
How to Add 7 Days to a Date in Excel (3 Methods)
How to Add 7 Days to a Date in Excel (3 Methods)
NEW Date Picker in Excel for Web – Finally Here
NEW Date Picker in Excel for Web – Finally Here
How to insert dates from a Popup Calendar (date picker) in Excel – user guide | XLTools
How to insert dates from a Popup Calendar (date picker) in Excel – user guide | XLTools
How to insert calendar in Excel (Date Picker & printable calendar template)
How to insert calendar in Excel (Date Picker & printable calendar template)
How to fill date by week in Excel quickly and easily?
How to fill date by week in Excel quickly and easily?
How to Create a Timestamp in Excel
How to Create a Timestamp in Excel
Never waste time typing out dates again with this calendar tool. 🗓
Never waste time typing out dates again with this calendar tool. 🗓
Google Sheets - Add a Pop-Up Calendar Date Picker
Google Sheets - Add a Pop-Up Calendar Date Picker
How to Filter Dates by Month and Year in Excel (4 Easy Methods)
How to Filter Dates by Month and Year in Excel (4 Easy Methods)
Create a date sequence in Excel and auto fill date series
Create a date sequence in Excel and auto fill date series
Calender in Excel ‼️ Amazing Excel trick using data validation and conditional formatting ✅ #Excel
Calender in Excel ‼️ Amazing Excel trick using data validation and conditional formatting ✅ #Excel
How To Add 3 Different Date Picker Calendars in Microsoft Excel [Free Download]
How To Add 3 Different Date Picker Calendars in Microsoft Excel [Free Download]
Auto-Fill Dates in Excel
Auto-Fill Dates in Excel
How to Quickly Insert Date And Time In Excel
How to Quickly Insert Date And Time In Excel
How to Use Dates in Excel - 10 Things You Must Know
How to Use Dates in Excel - 10 Things You Must Know
How to install the Calendar and date picker on your toolbox
How to install the Calendar and date picker on your toolbox
Perfect Inserting A Dropdown Calendar In Excel
Perfect Inserting A Dropdown Calendar In Excel
How to Insert a Calendar in Excel (the Simplest Way)
How to Insert a Calendar in Excel (the Simplest Way)

Initializing the Date Picker

In the 'UserForm_Initialize' section, add the following code:

```vbnet Private Sub UserForm_Initialize() Me.dtPicker.Value = Date End Sub ```

This code sets the initial value of the date picker to today's date.

Handling Date Selection

Next, we'll add code to handle when a user selects a date. In the 'UserForm' section, add the following code:

```vbnet Private Sub dtPicker_Change() ThisWorkbook.Sheets("YourSheetName").Range("YourCellReference").Value = Me.dtPicker.Value End Sub ```

Replace 'YourSheetName' with the name of your worksheet and 'YourCellReference' with the cell reference where you want to place the selected date.

Using the Date Picker

Now that our date picker is set up, let's use it. Back in Excel, press Alt + F8 to open the Macro dialog box. Select 'DatePicker' and click 'Run'.

Your user form should appear, displaying the date picker. Select a date, and it should automatically populate in the specified cell on your worksheet.

Troubleshooting

If your date picker isn't working as expected, double-check your VBA code and ensure you've replaced 'YourSheetName' and 'YourCellReference' with the correct values.

Also, ensure that your user form is set to 'DisplayForm' when you run the macro. You can do this by adding 'DatePicker.Show' before 'DatePicker.Run' in the Macro dialog box.

And there you have it! You've successfully added a date picker to an Excel cell. This little hack can save you time and reduce errors in your data entry. Happy pickin'!