#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 37
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,440
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date Formating orquidea Excel Discussion (Misc queries) 2 October 24th 07 03:29 AM
Date formating Hawksby Excel Discussion (Misc queries) 2 December 14th 06 06:33 PM
Date formating chad Excel Worksheet Functions 3 October 21st 06 03:31 PM
Saving file in the format "YYMM" Dolphinv4 Excel Discussion (Misc queries) 2 October 5th 05 12:08 PM
Macro to auto save file using the format YYMM Dolphinv4 Excel Discussion (Misc queries) 1 September 29th 05 04:09 AM


All times are GMT +1. The time now is 11:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"