View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jonathan Rynd Jonathan Rynd is offline
external usenet poster
 
Posts: 15
Default TEXT(Cell1,"MMMM YYYY") to work in all locale.

?B?S2V2aW4gTWNDYXJ0bmV5?=
wrote in :

="Month :- " & TEXT($A$2,"MMMM YYYY")


change this to

="Month :- " & TEXT($A$2,REPT(MONTHCHAR(),4)&" "&REPT(YEARCHAR(),4))

then write the vb functions MONTHCHAR and YEARCHAR:

Function MONTHCHAR() as String
MonthCHar = Application.International(xlMonthCode)
End Function

Function YEARCHAR() as String
YearChar = Application.International(xlYearCode)
End Function

--
My email address has an extra @ (spell it out) and an extra invalid. Please
remove them if you are not a spammer or list broker and want to reply.