Excel Date Picker

sutclpa

Board Regular
Joined
Dec 21, 2006
Messages
83
Hi All,

I have been trying to insert a calander function into an excel worksheet, and have come across the Date Picker function.

So far i have placed this directly onto my worksheet and linked the object directly to a cell. The problem i am having is that when i select a date from the calander, it is placed into the cell as text which is subsequently messing with my formulas.

Is there a way to amend this so that the cell value is entered as a date?
 

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.

ADAMC

Well-known Member
Joined
Mar 20, 2007
Messages
1,169
Office Version
  1. 2013
Platform
  1. Windows
Sounds like you need to format your cells or colums as date format.

Highlight your range
Right click
Format cells
Choose 'date'
Select which formatting you like
 

Lewiy

Well-known Member
Joined
Jan 5, 2007
Messages
4,284
Have you looked at the Calendar control? This is usually found under the “More Tools” button on the Control Toolbox toolbar.
 

sutclpa

Board Regular
Joined
Dec 21, 2006
Messages
83
Hi,

The cells are already formated as dates, however the date picker overwrites this.

Also, unfortunately i do not have the calander function installed which is why i've plumped for the date picker instead. Thanks for the link to the addin, but i am trying to avoid doing thing this way as i will have to distribute the sheet to several people when complete.
 

sutclpa

Board Regular
Joined
Dec 21, 2006
Messages
83
Hi All,

I have resolved this now. In case anybody is interested, i did it by adding the following code to the VBA code associated with the object.

Private Sub DTPicker2_CloseUp()
Range("E4").Select
Selection.TextToColumns Destination:=Range("E4"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=False, FieldInfo _
:=Array(1, 4)
End Sub

Basically it utilises the text to columns function from excel and performs it each time a new value is selected.
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,152,102
Messages
5,768,102
Members
425,454
Latest member
khoro

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top