need to do a calculation.

G

Guest

i need to do a calculation. Example:

I have a Figure i.e. 3 Years 10 Months and 28 Days
If I add 1one, 4 months and 4 days to it, normally the result will appear as
4 years, 14 months and 32 days. What I want is to have the result is 5
years, 2 months and 2 days.

Year Month Days
3 10 28
1 4 4
4 14 32
It should appear as

5 2 2


Anybody can help??
 
D

David Biddulph

As not all months have the same number of days, this isn't a calculation you
can do without defining your arithmetic.

I guess that rather than 5 2 2, you probably intended 5 3 2?
14 months would be 1 year and 2 months, and if you are taking each month as
30 days then your 32 days would be 1 month and 2 days.

If your 4 14 32 are in A4:C4, you could convert these with:
=A4+INT(B4/12)
=MOD(B4,12)+INT(C4/30)
=MOD(C4,30)
to give 5 3 2
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top