Selected Answer

Presuming that your first column is column A and your second column is column B you might use the formula below in row 3 of your third column.

`=IF($B3 = EDATE($A3,24), "2 years",IF($B3=EDATE($A3,12),"1 year","?"))`

Note that this formula presumes that you calculate a year from Jan 1 to Jan 1. If your contract year ends on Dec 31 modify the comparison date in the formula to EDATE($A3,24)-1

Your fourth column might have this formula.

`=IF($B3>TODAY(),"","Expired")`

Note that it will not show the contract as expired on its last day of validity (the date in B3). If you want to change that modify the comparison operator to >=

For your fifth column I suggest the following formula.

`=IF(AND(TODAY() >=EDATE($B3,-1),$D3=""),"to inform","")`

Observe that it refers to cell D3 which is your fourth column to decide that it will not show "to inform" after the contract is expired. As an alternative, you might combine "to inform" and "Expired" into a single column with this formula.

`=IF(TODAY()>$B3,"Expired",IF(TODAY() >=EDATE($B3,-1),"to inform",""))`

Note that EDATE($B3,-1) specifies a date which is exactly 1 month before the date in B3. This date is compared with today's date in IF(TODAY() >=EDATE($B3,-1). You can modify the date to be compared. For example, EDATE($B3,-1)-5 would be a date 5 days before the date which is 1 month before B3. It may not be strictly necessary but I would recommend to enclose such a calculation in parentheses., thus (EDATE($B3,-1)-5).

Good luck!