#1   Report Post  
 
Posts: n/a
Default years and months

hi

How do i display 17 as 1 year 5 months, 26 months as 2 years 2months
etc etc

thanks for any help
  #2   Report Post  
Dave R.
 
Posts: n/a
Default

=INT(A1/12)&" years and "&MOD(A1,12)&" months."


wrote in message
...
hi

How do i display 17 as 1 year 5 months, 26 months as 2 years 2months
etc etc

thanks for any help



  #3   Report Post  
JE McGimpsey
 
Posts: n/a
Default

One way:

=INT(A1/12) & IF(INT(A1/12)<1," years "," year ") & MOD(A1,12) &
IF(MOD(A1,12)<1," months"," month")





In article ,
wrote:

hi

How do i display 17 as 1 year 5 months, 26 months as 2 years 2months
etc etc

thanks for any help

  #4   Report Post  
 
Posts: n/a
Default

Hi

Thanks for your help
  #5   Report Post  
 
Posts: n/a
Default



thanks but how can i cope with neg numbers

-3 will not shows as 3 months (Pef in red font)




On Fri, 07 Jan 2005 19:01:38 +0000, wrotg:

hi

How do i display 17 as 1 year 5 months, 26 months as 2 years 2months
etc etc

thanks for any help




  #6   Report Post  
JE McGimpsey
 
Posts: n/a
Default

One way:

=INT(ABS(A1)/12) & IF(INT(ABS(A1)/12)<1," years "," year ") &
MOD(ABS(A1),12) &IF(MOD(ABS(A1),12)<1," months"," month")

Use conditional to make the font red if A1 is negative:

CF1: Formula is =A1<0
Format: Font-Red


In article ,
wrote:

thanks but how can i cope with neg numbers

-3 will not shows as 3 months (Pef in red font)

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
rolling months tjkyon Excel Discussion (Misc queries) 2 January 20th 05 05:39 PM
How do I set up an calculation to work out somebody's age from th. AlexS. Excel Discussion (Misc queries) 4 January 10th 05 06:29 PM
Calculate due date 1 or 2 years ahead to the first of the followi. Wayne New Users to Excel 5 December 23rd 04 11:04 PM
Calculate months and years Ned Ludd Excel Discussion (Misc queries) 5 December 10th 04 01:57 PM
How do I display months and years between two dates JSmith Excel Discussion (Misc queries) 1 November 30th 04 04:41 PM


All times are GMT +1. The time now is 04:54 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"