надо сынок
какой еще с интэджер оно же ещё...unknown
vbscript
a year ago
1.4 kB
2
Indexable
Never
Function ReturnDays(Result As String) As Integer Dim month(12) As String Dim AmountDay(12) As Integer month(0) = "январь" month(1) = "февраль" month(2) = "март" month(3) = "апрель" month(4) = "май" month(5) = "июнь" month(6) = "июль" month(7) = "август" month(8) = "сентябрь" month(9) = "октябрь" month(10) = "ноябрь" month(11) = "декабрь" AmountDay(0) = 31 AmountDay(1) = 29 AmountDay(2) = 31 AmountDay(3) = 30 AmountDay(4) = 31 AmountDay(5) = 30 AmountDay(6) = 31 AmountDay(7) = 31 AmountDay(8) = 30 AmountDay(9) = 31 AmountDay(10) = 30 AmountDay(11) = 31 If Result = month(0) Then ReturnDays = AmountDay(0) ElseIf Result = month(1) Then ReturnDays = AmountDay(1) ElseIf Result = month(2) Then ReturnDays = AmountDay(2) ElseIf Result = month(3) Then ReturnDays = AmountDay(3) ElseIf Result = month(4) Then ReturnDays = AmountDay(4) ElseIf Result = month(5) Then ReturnDays = AmountDay(5) ElseIf Result = month(6) Then ReturnDays = AmountDay(6) ElseIf Result = month(7) Then ReturnDays = AmountDay(7) ElseIf Result = month(8) Then ReturnDays = AmountDay(8) ElseIf Result = month(9) Then ReturnDays = AmountDay(9) ElseIf Result = month(10) Then ReturnDays = AmountDay(10) ElseIf Result = month(11) Then ReturnDays = AmountDay(11) Else ReturnDays = CVErr(xlErrValue) End If End Function