我需要有关此代码的帮助。现在这是查看日历年季度,但我想对其进行修改以查看财政年度季度。
Function test(time)
Quarter = Format(time, "YYYYq")
For vRow = 2 To 1000
report_time = Format(Sheets("data").Range("A" & vRow).Value, "YYYYq")
Assessment = Sheets("data").Range("V" & vRow).Value
If (report_time = Quarter) Then
denominator = denominator + 1
If (Assessment= 1) Then
numerator = numerator + 1
End If
End If
Next
If denominator > 0 Then
test = numerator / denominator
Else
test = 0
End If
End Function
我将不胜感激您的时间和建议。