Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
(month) 2 digits in formula
Hi! there,
I appreciate if someone can help me to solve this. I have formula in A2,3,4.. cell like =IF(B2="","",YEAR(B2)&"-"&MONTH(B2)&"-"&($A$1+C2)&"AT"). 0 2009-3-1AT 06-Mar-09 1 2009-3-2AT 07-Mar-09 2 2009-3-3AT 08-Mar-09 3 I want the result to be "2009-03-01AT" instead of "2009-3-1AT". I have no idea how to format 2 digits in month place. Thanks in advance Bradley |
#2
|
|||
|
|||
Answer: (month) 2 digits in formula
Hi Bradley,
To format the month with 2 digits in your formula, you can use the Code:
TEXT
The Code:
TEXT
__________________
I am not human. I am an Excel Wizard |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
(month) 2 digits in formula
Try it like this:
=IF(B2="","",YEAR(B2)&"-"&TEXT(MONTH(B2),"00")&"-"&$A$1+C2&"AT") -- Biff Microsoft Excel MVP "Bradley" wrote in message ... Hi! there, I appreciate if someone can help me to solve this. I have formula in A2,3,4.. cell like =IF(B2="","",YEAR(B2)&"-"&MONTH(B2)&"-"&($A$1+C2)&"AT"). 0 2009-3-1AT 06-Mar-09 1 2009-3-2AT 07-Mar-09 2 2009-3-3AT 08-Mar-09 3 I want the result to be "2009-03-01AT" instead of "2009-3-1AT". I have no idea how to format 2 digits in month place. Thanks in advance Bradley |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
(month) 2 digits in formula
Or, maybe this:
=IF(B2="","",TEXT(B2,"yyyy-mm")&"-"&$A$1+C2&"AT") -- Biff Microsoft Excel MVP "T. Valko" wrote in message ... Try it like this: =IF(B2="","",YEAR(B2)&"-"&TEXT(MONTH(B2),"00")&"-"&$A$1+C2&"AT") -- Biff Microsoft Excel MVP "Bradley" wrote in message ... Hi! there, I appreciate if someone can help me to solve this. I have formula in A2,3,4.. cell like =IF(B2="","",YEAR(B2)&"-"&MONTH(B2)&"-"&($A$1+C2)&"AT"). 0 2009-3-1AT 06-Mar-09 1 2009-3-2AT 07-Mar-09 2 2009-3-3AT 08-Mar-09 3 I want the result to be "2009-03-01AT" instead of "2009-3-1AT". I have no idea how to format 2 digits in month place. Thanks in advance Bradley |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
(month) 2 digits in formula
Hi! Valko,
Thanks a lot and that is what i want. :) Bradley "T. Valko" wrote: Or, maybe this: =IF(B2="","",TEXT(B2,"yyyy-mm")&"-"&$A$1+C2&"AT") -- Biff Microsoft Excel MVP "T. Valko" wrote in message ... Try it like this: =IF(B2="","",YEAR(B2)&"-"&TEXT(MONTH(B2),"00")&"-"&$A$1+C2&"AT") -- Biff Microsoft Excel MVP "Bradley" wrote in message ... Hi! there, I appreciate if someone can help me to solve this. I have formula in A2,3,4.. cell like =IF(B2="","",YEAR(B2)&"-"&MONTH(B2)&"-"&($A$1+C2)&"AT"). 0 2009-3-1AT 06-Mar-09 1 2009-3-2AT 07-Mar-09 2 2009-3-3AT 08-Mar-09 3 I want the result to be "2009-03-01AT" instead of "2009-3-1AT". I have no idea how to format 2 digits in month place. Thanks in advance Bradley |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
(month) 2 digits in formula
You're welcome. Thanks for the feedback!
-- Biff Microsoft Excel MVP "Bradley" wrote in message ... Hi! Valko, Thanks a lot and that is what i want. :) Bradley "T. Valko" wrote: Or, maybe this: =IF(B2="","",TEXT(B2,"yyyy-mm")&"-"&$A$1+C2&"AT") -- Biff Microsoft Excel MVP "T. Valko" wrote in message ... Try it like this: =IF(B2="","",YEAR(B2)&"-"&TEXT(MONTH(B2),"00")&"-"&$A$1+C2&"AT") -- Biff Microsoft Excel MVP "Bradley" wrote in message ... Hi! there, I appreciate if someone can help me to solve this. I have formula in A2,3,4.. cell like =IF(B2="","",YEAR(B2)&"-"&MONTH(B2)&"-"&($A$1+C2)&"AT"). 0 2009-3-1AT 06-Mar-09 1 2009-3-2AT 07-Mar-09 2 2009-3-3AT 08-Mar-09 3 I want the result to be "2009-03-01AT" instead of "2009-3-1AT". I have no idea how to format 2 digits in month place. Thanks in advance Bradley |
#7
Posted to microsoft.public.excel.misc
|
|||
|
|||
(month) 2 digits in formula
Use following formula =TEXT(A1,"yyyy-mm-dd") Chris ------ Convert your Excel spreadsheet into an online calculator. http://www.spreadsheetconverter.com -- Chris Bode |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Formula to sum the digits | Excel Worksheet Functions | |||
How to display month in 2 digits? | Excel Discussion (Misc queries) | |||
How to customize number to 10 digits including 2 digits after deci | Excel Worksheet Functions | |||
Trying to get a Boolean formula to work month-to-month | Excel Discussion (Misc queries) | |||
month & year format in two digits | Excel Discussion (Misc queries) |