Sub Echéances()
' Echéances Macro
' Macro enregistrée le 12/06/2010 par Gruick
For c = Cells(2 ^ 16, 4).End(xlUp).Row To Cells(14, 4).Row Step -1
If Cells(c, 4) = "CT" Then
Cells(8, 3) = DateSerial(Year(Cells(c, 1)) + 1, Month(Cells(c, 1)), Day(Cells(c, 1)))
GoTo révision
End If
Next c
Cells(8, 3) = DateSerial(Year(Cells(4, 5) + 1), Month(Cells(4, 5)), Day(Cells(4, 5)))
révision:
For r = Cells(2 ^ 16, 4).End(xlUp).Row To Cells(14, 4).Row Step -1
If Cells(r, 4) = "Révision" Then
Cells(8, 6) = Cells(r, 2) + 30000
Exit Sub
End If
Next r
Cells(8, 6) = 30000
End Sub