ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   "3" TO MARCH OR "11" TO NOVEMBER (https://www.excelbanter.com/excel-programming/300337-3-march-11-november.html)

Sunil Patel

"3" TO MARCH OR "11" TO NOVEMBER
 
Hi

Is there an easy method in VBA to convert m% to m$
where m%=3 and m$ should be "march"

Thanks

Sunil




kkknie[_130_]

"3" TO MARCH OR "11" TO NOVEMBER
 
Using Excel 2002:

m$ = MonthName(m%)

K


---
Message posted from http://www.ExcelForum.com/


Bernie Deitrick

"3" TO MARCH OR "11" TO NOVEMBER
 
Sunil,

Dim m As Integer
m = 3
MsgBox Format(DateValue(m & "/1/2004"), "mmmm")

HTH,
Bernie
MS Excel MVP

"SUNIL PATEL" wrote in message
...
Hi

Is there an easy method in VBA to convert m% to m$
where m%=3 and m$ should be "march"

Thanks

Sunil






Harald Staff

"3" TO MARCH OR "11" TO NOVEMBER
 
Hi Bernie

In most of Eurpoe this equals
MsgBox "january".
Allow me to suggest
MsgBox Format(DateSerial(2004, m, 1), "mmmm")

HTH. Best wishes Harald

"Bernie Deitrick" <deitbe @ consumer dot org skrev i melding
...
Sunil,

Dim m As Integer
m = 3
MsgBox Format(DateValue(m & "/1/2004"), "mmmm")

HTH,
Bernie
MS Excel MVP

"SUNIL PATEL" wrote in message
...
Hi

Is there an easy method in VBA to convert m% to m$
where m%=3 and m$ should be "march"

Thanks

Sunil








Norman Harker

"3" TO MARCH OR "11" TO NOVEMBER
 
Hi!

Or:

MsgBox Format(m*29, "mmmm")


--
Regards
Norman Harker MVP (Excel)
Sydney, Australia





All times are GMT +1. The time now is 08:01 AM.

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