|
高兴,3500了!
与同行分享:
税_2011年_20110630.rar
(13.88 KB, 下载次数: 1448)
Function gts1(Optional a = 0, Optional y = -1)
'gts1(月收入),gts1(年收入,月收入)
Application.Volatile
b = 3500: i% = 1
If y = -1 Then x = a - b Else b = Application.Max(b - y, 0): x = (a - b) / 12
Dim arr(1 To 7), arr1, arr2, arr3
arr1 = Split("0.03, 0.1, 0.2, 0.25, 0.3, 0.35, 0.45", ",") '各档税率
arr2 = Split("0,21,111,201,551,1101,2701", ",") '各档扣除数
For Each c In Array(0, 1500, 4500, 9000, 35000, 55000, 80000) '各档级距
If x > c Then arr(i) = (a - b) * arr1(i - 1) - 5 * arr2(i - 1): i = i + 1
Next c
gts1 = Round(Application.Max(arr, 0) + 0.0001, 2)
End Function
Function gts2(Optional a = 0, Optional y = -1)
'gts2(月收入),gts2(年收入,月收入)
Application.Volatile
b = 3500: i% = 0: Dim arr
arr = Split("0.03, 0.07, 0.1, 0.05, 0.05, 0.05, 0.1", ",")
If y = -1 Then x = a - b Else b = Application.Max(b - y, 0): x = (a - b) / 12
For Each c In Array(0, 1500, 4500, 9000, 35000, 55000, 80000) '各档级距
If x > c Then gts2 = gts2 + (a - b - c) * arr(i): i = i + 1
Next c
gts2 = Round(gts2 + 0.0001, 2)
End Function
Function gts3(Optional a = 0, Optional y = -1)
'gts3(月收入),gts3(年收入,月收入)
Application.Volatile
b = 3500
If y = -1 Then x = a - b Else b = Application.Max(b - y, 0): x = (a - b) / 12
s = a - b
Select Case x
Case Is <= 0
gts3 = 0
Case Is <= 1500
gts3 = s * 0.03
Case Is <= 4500
gts3 = s * 0.1 - 105
Case Is <= 9000
gts3 = s * 0.2 - 555
Case Is <= 35000
gts3 = s * 0.25 - 1005
Case Is <= 55000
gts3 = s * 0.3 - 2755
Case Is <= 80000
gts3 = s * 0.35 - 5505
Case Else
gts3 = s * 0.45 - 13505
End Select
gts3 = Round(gts3 + 0.0001, 2)
End Function
[ 本帖最后由 wangtx218 于 2011-7-3 08:42 编辑 ] |
评分
-
2
查看全部评分
-
|