#1   Report Post  
 
Posts: n/a
Default Get month from date

Useing VBA, how to I get the month from a date in range("a1") as text.
Eg if date = 30/1/02, Month = "January" or 30/10/05 then month =
"October". I want to worksheets with the month.
Regards Robert

  #2   Report Post  
Niek Otten
 
Posts: n/a
Default Get month from date

MonthA = format(range("a1"),"mmmm")

--
Kind regards,

Niek Otten

wrote in message
oups.com...
Useing VBA, how to I get the month from a date in range("a1") as text.
Eg if date = 30/1/02, Month = "January" or 30/10/05 then month =
"October". I want to worksheets with the month.
Regards Robert



  #3   Report Post  
Dave Peterson
 
Posts: n/a
Default Get month from date

Another way, depending on what version of excel you're using:

MsgBox MonthName(Month(Date))

(I think xl2k added MonthName...)

wrote:

Useing VBA, how to I get the month from a date in range("a1") as text.
Eg if date = 30/1/02, Month = "January" or 30/10/05 then month =
"October". I want to worksheets with the month.
Regards Robert


--

Dave Peterson
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
Formula to get 1st,2nd,3rd,4th,5th Sundays from month end date. mikeburg Excel Discussion (Misc queries) 5 September 29th 05 06:59 PM
enter month end date tjb Excel Worksheet Functions 3 September 26th 05 11:07 PM
using date function, month shows as January when i type (12) hsas Excel Discussion (Misc queries) 3 June 17th 05 07:15 PM
Formula for Extracting Month out of a Date column PokerZan Excel Discussion (Misc queries) 3 June 10th 05 08:30 PM
Return the end of month date from a date Steve F. Excel Worksheet Functions 3 October 28th 04 06:17 PM


All times are GMT +1. The time now is 07:10 AM.

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

About Us

"It's about Microsoft Excel"