Situatie
When working with large or shared worksheets, maintaining data integrity is the biggest problem, especially when it comes to entering dates. Should they be entered as mm/dd/yy or dd/mm/yy or mm-dd-yyyy? And can I simply type a date like “05 Sep 2016”?
Solutie
Pasi de urmat
Show the Developer tab on the ribbon
The datepicker control belongs to a family of ActiveX controls, which reside on the Developer tab. By default, the Developer tab is hidden in Excel, but you can force it to appear in no time.
- Right-click anywhere on the ribbon, and then click Customize the Ribbon…
- In the right-hand part of the window, select Main Tabs (usually it is selected by default), check the Developerbox, and click OK.
Insert a calendar control
A drop-down calendar in Excel is technically called Microsoft Date and Time Picker Control. To insert it in your sheet, just do the following:
- Go to the Developer tab > Controls group, click Insert, and then click the More Controls button under ActiveX Controls.
In the More Controls dialog window, find the Microsoft Date and Time Picker Control 6.0 (SP6), select it, and click OK.
As soon as the datepicker control is inserted, the EMBED formula appears in the formula bar. It informs Excel what type of control is embedded in the sheet, and in no case you should change or delete it, because this would result in the “Reference is not valid” error.
Inserting any ActiveX control (including DTPiker) automatically turns the Design Mode on allowing you to modify the appearance and properties of the newly added control. The most obvious changes that you will want to make most of the time is to resize your calendar control and link it to a specific cell.
- To activate your Excel drop down calendar, go to the Design tab > Controls group, and turn off the Design Mode
- And now, you can click on the dropdown arrow to display the calendar and select the desired date:
Customize the calendar control
After adding a calendar control to your Excel sheet, the first thing you may to do is to move it to the desired location and get it to fit into a cell.To resize the datepicker control, turn the Design Mode on, and drag a corner of the control:
- In the Properties window, you can set the desired height, width as well as change the font theme and size:
Leave A Comment?