"3" TO MARCH OR "11" TO NOVEMBER

  • Thread starter Thread starter SUNIL PATEL
  • Start date Start date
S

SUNIL PATEL

Hi

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

Thanks

Sunil
 
Sunil,

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

HTH,
Bernie
MS Excel MVP
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top