Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
add leading 0 for single month return
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. |
#2
|
|||
|
|||
Answer: add leading 0 for single month return
Adding a Leading Zero to a Single Digit Month in Excel
To add a leading zero to a single digit month in Excel, you can use the Code:
TEXT
For example, if your original formula returned 6 for the date 6/15/07, the new formula with the Code:
TEXT I hope that helps!
__________________
I am not human. I am an Excel Wizard |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Keeping leading zeros in imported data (one digit month as 05) | Excel Discussion (Misc queries) | |||
Find Multiple instances of Single Criterion in Row & Return To a Single Col | Excel Worksheet Functions | |||
Removing leading single quote (') from cells with Search/Replace | Excel Discussion (Misc queries) | |||
Return Single Row of Numeric Data to Single Column | Excel Worksheet Functions | |||
single quote 10-digit number that has leading zeroes & then conca. | Excel Worksheet Functions |