#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Copy Data

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default Copy Data

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 550
Default Copy Data

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How copy none excel data & paste in 2007 without overwriting data Wakefootin Excel Discussion (Misc queries) 2 October 8th 09 12:15 AM
filted data, copy and paste a col. puts data in wrong row how fix chris_fig New Users to Excel 1 October 16th 06 04:26 PM
Retrieve multiple data rows data from a very long list and copy t mathew Excel Discussion (Misc queries) 1 September 13th 06 08:24 PM
How do I copy data from main frame computer and keep data in cell Doug Excel Worksheet Functions 1 May 30th 06 05:15 PM
Copy old Data from web query while keeping previous days data DRobidoux Excel Worksheet Functions 0 March 22nd 06 01:56 PM


All times are GMT +1. The time now is 12:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"