ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   TEXT(Cell1,"MMMM YYYY") to work in all locale. (https://www.excelbanter.com/excel-programming/291200-re-text-cell1-mmmm-yyyy-work-all-locale.html)

Jonathan Rynd

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.


All times are GMT +1. The time now is 02:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com