Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I have in cell A1 the value 31/09/2003 This is formatted has mmmm/yyyy So the result is "September 2003" What code should I write in order for getting the variable strMon with the first 3 caracters of September "Sep" Thanks Pedro |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I don't quite understand but if you just want to format your date as Sep
mmm "PEdro" wrote in message ... Hi I have in cell A1 the value 31/09/2003 This is formatted has mmmm/yyyy So the result is "September 2003" What code should I write in order for getting the variable strMon with the first 3 caracters of September "Sep" Thanks Pedro |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
PEdro,
First of all, there isn't a September 31st (at least on my calendar). When you enter a date in a cell, it's stored numerically. When you format it, all you're doing is telling Excel how you'd like it displayed. It doesn't really change its numeric equivalent. So if there's a date in A1 and you just want the three letter month, the following should work: Sub TestMe() Dim rDate As String rDate = Format(Range("A1").Value, "mmm") MsgBox rDate End Sub John PEdro wrote: Hi I have in cell A1 the value 31/09/2003 This is formatted has mmmm/yyyy So the result is "September 2003" What code should I write in order for getting the variable strMon with the first 3 caracters of September "Sep" Thanks Pedro |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How copy none excel data & paste in 2007 without overwriting data | Excel Discussion (Misc queries) | |||
filted data, copy and paste a col. puts data in wrong row how fix | New Users to Excel | |||
Retrieve multiple data rows data from a very long list and copy t | Excel Discussion (Misc queries) | |||
How do I copy data from main frame computer and keep data in cell | Excel Worksheet Functions | |||
Copy old Data from web query while keeping previous days data | Excel Worksheet Functions |