Search code examples
excelfunctionformula

Date calculation issue in excel


Could you please help me in below calculations? Problems are highlighted in red colour in the snapshot below. enter image description here


Solution

  • I put 1/Jul/21 in B1 and 1/Jul/23 in C1,

    Then this:

    YEAR(C1)-YEAR(B1)
    

    gives the result 2.

    Use month() etc to complete the others, as you provided an image I just did one.