ник: ars_bs
либо вот на скорую руку вроде работает
Public Function date_itog(date_nach As Date, mes As Integer) As Date
Dim x, y, z As Integer
Dim mes1 As Integer
Dim yaer1 As Integer
Dim day1 As String
mes1 = Month(date_nach)
yaer1 = Year(date_nach)
day1 = "01"
If mes1 < mes Then
x = mes1 - mes
mes1 = 12 + x
yaer1 = yaer1 - 1
x = day1 & "/" & Str(mes1) & "/" & Str(yaer1)
ElseIf mes1 = mes Then
yaer1 = yaer1 - 1
mes1 = 12
x = day1 & "/" & Str(mes1) & "/" & Str(yaer1)
ElseIf mes1 > mes Then
mes1 = mes1 - mes
x = day1 & "/" & Str(mes1) & "/" & Str(yaer1)
End If
date_itog = CDate(x)
End Function
пример запуска:
итоговоеполе=date_itog(поледата,поле количество просроченных месяцев)