View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Ron Coderre Ron Coderre is offline
external usenet poster
 
Posts: 2,118
Default add leading 0 for single month return

If you only want to *display* the leading zero
try this:

From the Excel Main Menu:
<format<cells<number tab
Category: Custom
Type: 00
Click the [OK] button

Alternatively, this formula actually creates a 2-character *text* string:
=TEXT(MONTH(A1),"00")

Does that help?
Post back if you have more questions.
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)

"Cam" wrote in message
...
Hello,

I got a date field and calculate the month out of that date field using
=MONTH(Date) and it returns the month,for example 6/15/07 (return 6) and
11/20/07 (11),
how do I tell it to return 06 instead of 6 on the single digit month.