Splitting cell into 3 userform boxes (Deconcatenate)

meerkatmatt

New Member
Joined
Sep 23, 2014
Messages
2
Hi all

Hope you can help.

I've been having issues with date formatting when I transfer dates from a userform to the excel workbook (everything moves into US format) even though I've done various formatting in the VBA using functions etc.

What I've now done is to have the date split on the userform into Day Month Year boxes. When I submit this it then concatenates it into 1 cell on the worksheet. What I need to do is when I need to update the userform with other information is to have the date pulled back into the userform in the 3 boxes from the 1 cell. I have got the date in the form of e.g. 23-Sep-2014

Hope this makes sense.

Thank you in advance of your help.

Matt
 

Some videos you may like

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

John_w

MrExcel MVP
Joined
Oct 15, 2007
Messages
6,465
If the date in the cell is an Excel date then you can use these functions to get the 3 parts:
Code:
    Debug.Print Day(Range("A1").Value)
    Debug.Print Month(Range("A1").Value)
    Debug.Print Year(Range("A1").Value)
If you need the month name, call the MonthName function.
 

Watch MrExcel Video

Forum statistics

Threads
1,114,084
Messages
5,545,863
Members
410,711
Latest member
Josh324
Top