When I saw this post two days ago, I thought, "Why is this person asking such a simple question?" Then, just now, I came to know that it's always a challenge to work with dates and time in Excel. In this case, you have to make Excel understand that 5.2 represents 5 years and 2 months. Once you can do this, then you can easily add.
Excel always takes fractions on the basis of full integers, not as you wish. So, when you enter 5.2 years in Excel, it means 5 years and 0.2 years, which translates to 2.4 months, not just 2 months.
That's why 5.2 multiplied by 12 gives 62.4 months, not just 62 months as you might expect.
Please understand the formulas, fractions, and dates in Excel to grasp how Excel interprets decimals. You have to write a code or use a formula that would make Excel understand that 5.2 means 5 years and 2 months. So, when we add 5.2 to 1.11, Excel should recognize to separate the integer and decimal parts, add the integers (5 + 1 = 6), and add the decimals (2 + 11 = 13). Then, convert the decimal result (13) to yy.mm format (1.1), and finally, add 1.1 to 6, resulting in 7.1.
I have tried to do the same but have not been able to consolidate it into a single formula. Please see the Excel sheet where it takes two columns, and the final result is in the third column. Once you enter all the formulas, you can hide the two columns, check the formulas, and edit them if you think you can combine them into one formula.
Your question itself is incorrect and not clear. Being an IT student, you could have clearly specified that you want Excel to interpret a number as yy.mm, with the integer representing years and the decimal representing months, and then add such cells. The direct quoting of an example confused members.