Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Range split
Hi Somebody help me how can I copy dd, mm and yy from a text "dd/mm/yy" to 3 separat cells. thanks and regards HM -- hm ----------------------------------------------------------------------- hme's Profile: http://www.excelforum.com/member.php...fo&userid=1593 View this thread: http://www.excelforum.com/showthread.php?threadid=32002 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Range split
Without code
=DAY(A1) =MONTH(A1) =YEAR(A1) -- HTH RP (remove nothere from the email address if mailing direct) "hme" wrote in message ... Hi Somebody help me how can I copy dd, mm and yy from a text "dd/mm/yy" to 3 separate cells. thanks and regards HME -- hme ------------------------------------------------------------------------ hme's Profile: http://www.excelforum.com/member.php...o&userid=15930 View this thread: http://www.excelforum.com/showthread...hreadid=320024 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Range split
cell C6 has string 11/12/04
any cell type =LEFT(C6,2) gives11 another cell type =MID(C6,4,2) gives 12 yet another cell type =RIGHT(C6,2) gives 04 is this what you want ========== hme wrote in message ... Hi Somebody help me how can I copy dd, mm and yy from a text "dd/mm/yy" to 3 separate cells. thanks and regards HME -- hme ------------------------------------------------------------------------ hme's Profile: http://www.excelforum.com/member.php...o&userid=15930 View this thread: http://www.excelforum.com/showthread...hreadid=320024 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Range split
If your date is in cell A1:
=DAY(A1) =MONTH(A1) =YEAR(A1) or by vba: Sub test() Dim str As String, dtm As Date 'example 1 str = "13/01/04" Debug.Print Left(str, 2) Debug.Print Mid(str, 4, 2) Debug.Print Right(str, 2) 'example 2 dtm = str Debug.Print Day(dtm) Debug.Print Month(dtm) Debug.Print Year(dtm) End Sub -- Rob van Gelder - http://www.vangelder.co.nz/excel "hme" wrote in message ... Hi Somebody help me how can I copy dd, mm and yy from a text "dd/mm/yy" to 3 separate cells. thanks and regards HME -- hme ------------------------------------------------------------------------ hme's Profile: http://www.excelforum.com/member.php...o&userid=15930 View this thread: http://www.excelforum.com/showthread...hreadid=320024 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Range split
You could type the following directly into the target cells:
=day(A1) =month(A1) =year(A1) Note: A1 contains a date . This is sensitive to the short date setting in regional settings. Or, use the following with VBA. Format("yourdate","dd") Format("yourdate","mm") Format("yourdate","yyyy") "hme" wrote: Hi Somebody help me how can I copy dd, mm and yy from a text "dd/mm/yy" to 3 separate cells. thanks and regards HME -- hme ------------------------------------------------------------------------ hme's Profile: http://www.excelforum.com/member.php...o&userid=15930 View this thread: http://www.excelforum.com/showthread...hreadid=320024 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Cell Range Split into Multiple Cells | Excel Worksheet Functions | |||
Split Cell Range into Multiple Cells | Excel Discussion (Misc queries) | |||
Copying a split range | Excel Discussion (Misc queries) | |||
DGET Function - using a split criteria range? (Excel 2007) | Excel Worksheet Functions | |||
How do I remove split a split window? | New Users to Excel |