ник: debilder
Как мне исправить функцию?
Public Function kvartal() As Variant
Dim TheDate As Date
TheDate = now()
Dim MSG
Dim Y, Y1, Q, q1 As Integer
Y = Year(TheDate)
Q = DatePart("q", TheDate)
If Q > 1 Then
q1 = Q - 1
Y1 = Y
Else
q1 = 4
Y1 = Y - 1
End If
kvartal = q1