Forum Discussion

hhm-7's avatar
hhm-7
Copper Contributor
Nov 29, 2020

datedif for years > 1900

I try to user datediff for people who lived before 1/1/1900; this does not work as excel considers 1/1/1900 as day one. How can I get the result for someone who lived say from 1/3/1600 to 5/5/1665 ??

2 Replies

  • NikolinoDE's avatar
    NikolinoDE
    Platinum Contributor

    hhm-7 

     

    =DATEDIF(IF(ISERROR(YEAR(A2));LEFT(A2;6)&RIGHT(A2;4)+400;A2+(400*365.24));IF(ISERROR(YEAR(B2));LEFT(B2;6)&RIGHT(B2;4)+400;B2+(400*365.24));"Y")&" Years"

     

    Example in the file

     

    I would be happy to know if I could help.

     

    Nikolino

    I know I don't know anything (Socrates)

     

    * Kindly Mark and Vote this reply if it helps please, as it will be beneficial to more Community members reading here.