Ask Experts Questions for FREE Help !
Ask
    nikeshtnt's Avatar
    nikeshtnt Posts: 52, Reputation: 1
    Junior Member
     
    #1

    Aug 3, 2009, 09:50 PM
    Format an decimal as month
    How can 6.08 can be shown as 6 Yrs 1 Month and so on number of month would change like for 0.17 as 2, 0.25 as 3, 0.33 as 4...

    If condition is not working with Int() for more than 6 condition.

    Please help.
    ROLCAM's Avatar
    ROLCAM Posts: 1,420, Reputation: 23
    Ultra Member
     
    #2

    Aug 3, 2009, 10:28 PM

    These are the twelve decimals.

    1 0.083333
    2 0.166667
    3 0.25
    4 0.333333
    5 0.416667
    6 0.5
    7 0.583333
    8 0.666667
    9 0.75
    10 0.833333
    11 0.916667
    12 1.0
    JBeaucaire's Avatar
    JBeaucaire Posts: 5,426, Reputation: 997
    Software Expert
     
    #3

    Aug 3, 2009, 11:35 PM

    Play around with this:

    =INT(A1) & " years and " & LOOKUP(MOD(A1, 1), {0,0.833,0.167,0.25,0.333,0.417,0.5,0.583,0.667,0. 75,0.833,0.917}, {0,1,2,3,4,5,6,7,8,9,10,11}) & " months"

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

SAS code to Format decimal places and julian date [ 2 Answers ]

I am working with a data set that I would like to link with another data set. However, I need to do two thing before linking the two data set together. One is that I have a variable claim that I need to format. The variable has values 250, 5525 etc and I need to place a period to make it 2.50,...

Landlord Requiring 2 month Vacating Notice on 3 month (month to month) lease [ 21 Answers ]

I am in a situation and am in need of some advice. I am currently renting an apartment in Minneapolis. I am doing an internship which only requires me to live here for 3 Months. I signed a lease with a complex on a month to month basis. I planned to Move out at the end of April, so on march 1 I...

Upstate NY Month to Month lease termination- Prorated rent after 1st of next month? [ 2 Answers ]

Hi, As a month to month renter in Rochester, NY (outside the city) with no lease, I gave notice on June 3 that I would be moving out on July 1. My landlord proceeded to tell me that I would be responsible for the ENTIRE month of July's rent, even though my 30 day notice would take me to the...

Is it common to have a 2 month notice to vacate on a month to month lease? [ 2 Answers ]

Can my landlord require me to give a 2 months notice to vacate even though my lease is month to month? It was in the lease which was originally a 1 year lease which after the year, change to month to month. I can see giving 60 days with the year lease, but not on a month to month.

Decimal [ 24 Answers ]

I need help on my h.w it say write a decimal for fraction or mixed number questiom #1 3 - = what is the answer 10


View more questions Search