Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Converting months as # to Text Month

Programmatically, how would I convert the month from 1-12 to January -
December. Let's assume my variable for month is called MONTH.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Converting months as # to Text Month

This should be close...

Dim intMonth As Integer

intMonth = 5
MsgBox Format(DateSerial(2000, intMonth, 1), "mmm")

--
HTH...

Jim Thomlinson


"Barb Reinhardt" wrote:

Programmatically, how would I convert the month from 1-12 to January -
December. Let's assume my variable for month is called MONTH.

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 396
Default Converting months as # to Text Month

Hi Barb,

you could try:-

Sub Month()

Dim Mnth As String
Mnth = Format(Date, "mmmm")
MsgBox "This month is : " & Mnth

End Sub


Les Stout

*** Sent via Developersdex http://www.developersdex.com ***
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
Converting Number to Month in Text Problem RyanH Excel Worksheet Functions 5 March 30th 10 08:06 AM
Problem Converting date to month in text for use in pivot table Peters Excel Worksheet Functions 2 October 31st 08 11:16 AM
Converting Month Number to Month Text Abbreviation Bob Excel Worksheet Functions 10 May 12th 07 04:11 AM
Converting Text months to sortable Numbers or Dates Greg Excel Discussion (Misc queries) 6 May 1st 05 03:32 AM
converting months to years and months??? Marty Excel Discussion (Misc queries) 1 February 18th 05 02:38 AM


All times are GMT +1. The time now is 04:44 PM.

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"