#### mattkorguk

##### Registered User.

- Local time
- Today, 08:59

- Joined
- Jun 26, 2007

- Messages
- 301

Hi all,

I need to run some 'age' calculations within an old version of Excel (2003) and the info I have is month and year (recorded age at time of test).

I might have 7.6 - child was 7 years and 6 months old. (I do have their DoB)

Following the test, their test age is recorded as 6.11 - 6 years and 11 months.

So, the answer I'm after is -0.6

So far I've tried (returns -1.4);

This doesn't seem to work as I'd hope.

I've also tried this to try and deal with the 10,11 and 12 issues (returns -1.5);

Any other suggestions would be great, thanks.

Matt

I need to run some 'age' calculations within an old version of Excel (2003) and the info I have is month and year (recorded age at time of test).

I might have 7.6 - child was 7 years and 6 months old. (I do have their DoB)

Following the test, their test age is recorded as 6.11 - 6 years and 11 months.

So, the answer I'm after is -0.6

So far I've tried (returns -1.4);

Code:

`=F56-(DATEDIF(B56,D56,"y")& "."&DATEDIF(B56,D56,"ym"))`

I've also tried this to try and deal with the 10,11 and 12 issues (returns -1.5);

Code:

```
=IF(RIGHT(F56,LEN(F56)-FIND("/",F56))="10",(TRUNC(G56))-(TRUNC(D56))&"." &
(RIGHT(F56,LEN(F56)-FIND("/",F56)))-(RIGHT(C56,LEN(C56)-FIND("/",C56))),
IF(RIGHT(F56,LEN(F56)-FIND("/",F56))="11",(TRUNC(G56))-(TRUNC(D56))&"." &
(RIGHT(F56,LEN(F56)-FIND("/",F56)))-(RIGHT(C56,LEN(C56)-FIND("/",C56))),
IF(RIGHT(F56,LEN(F56)-FIND("/",F56))="12",(TRUNC(G56))-(TRUNC(D56))&"." &
(RIGHT(F56,LEN(F56)-FIND("/",F56)))-(RIGHT(C56,LEN(C56)-FIND("/",C56))),G56-D56)))
```

Matt

Last edited by a moderator: