ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   SPECIAL NUMBER FORMAT (https://www.excelbanter.com/excel-discussion-misc-queries/254663-special-number-format.html)

Faraz A. Qureshi

SPECIAL NUMBER FORMAT
 
I have come upto the custom format:

# "Years and " ?/12 "Months"

so as to represent

33.43189596
as
33 Years and 5/12 Months

However, any idea for modification of the same thus enabling me to reflect
the same without "/12" i.e. like:

33 Years and 5 Months
--
Thanx in advance,
Best Regards,

Faraz

Gary''s Student

SPECIAL NUMBER FORMAT
 
with your value in A1, try:

=ROUNDDOWN(A1,0) &" years "& ROUNDDOWN(MOD(A1,1)*12,0) & " months"

--
Gary''s Student - gsnu201001


"Faraz A. Qureshi" wrote:

I have come upto the custom format:

# "Years and " ?/12 "Months"

so as to represent

33.43189596
as
33 Years and 5/12 Months

However, any idea for modification of the same thus enabling me to reflect
the same without "/12" i.e. like:

33 Years and 5 Months
--
Thanx in advance,
Best Regards,

Faraz


Luke M

SPECIAL NUMBER FORMAT
 
Not sure if you can do all that with just a number format, but would a helper
column with a formula work?

=INT(A1)&" years and "&INT(MOD(A1,1)*12)&" months"
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Faraz A. Qureshi" wrote:

I have come upto the custom format:

# "Years and " ?/12 "Months"

so as to represent

33.43189596
as
33 Years and 5/12 Months

However, any idea for modification of the same thus enabling me to reflect
the same without "/12" i.e. like:

33 Years and 5 Months
--
Thanx in advance,
Best Regards,

Faraz



All times are GMT +1. The time now is 09:10 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com