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 |
=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 |
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 |
Hi
Thanks for your help |
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 |
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) |
All times are GMT +1. The time now is 12:19 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com