Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Date formating yymm
I'm trying to take a start and end day and figure out how many years and
months is inbetween. Except I need the outcome to be in the format of yymm. I can get just the number of months easy but can't figure out a way to get it in that format. Ex End Date - 2/1/2031 Start Date - 1/1/2008 = 277.22 months (rounded to) 277 months But I need the cell to return 2301 for 23 years 01 months |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Date formating yymm
Divide the value by 12 to get years. Use the MOD function to get the
remaining months. "sconstance" wrote in message ... I'm trying to take a start and end day and figure out how many years and months is inbetween. Except I need the outcome to be in the format of yymm. I can get just the number of months easy but can't figure out a way to get it in that format. Ex End Date - 2/1/2031 Start Date - 1/1/2008 = 277.22 months (rounded to) 277 months But I need the cell to return 2301 for 23 years 01 months |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Date formating yymm
=INT(A1/12)&TEXT(MOD(A1,12),"00")
But look here for a more precise way: http://www.cpearson.com/excel/datedif.aspx -- Kind regards, Niek Otten Microsoft MVP - Excel "sconstance" wrote in message ... | I'm trying to take a start and end day and figure out how many years and | months is inbetween. Except I need the outcome to be in the format of yymm. I | can get just the number of months easy but can't figure out a way to get it | in that format. | | Ex End Date - 2/1/2031 Start Date - 1/1/2008 = 277.22 months (rounded | to) 277 months | | But I need the cell to return 2301 for 23 years 01 months |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Date Formating | Excel Discussion (Misc queries) | |||
Date formating | Excel Discussion (Misc queries) | |||
Date formating | Excel Worksheet Functions | |||
Saving file in the format "YYMM" | Excel Discussion (Misc queries) | |||
Macro to auto save file using the format YYMM | Excel Discussion (Misc queries) |