本帖最后由 wangtx218 于 2011-8-31 19:51 编辑
不是的!我参考的代码:
Function GeShui(ShouRu As Double, FeiYong As Double, Optional LeiBie As Integer = 1) '个人所得税函数,ShouRu为应税收入,FeiYong为当地费用扣除标准 'LeiBie为选择参数,1为计算正常月度个人所得税,2为年终奖,-1为税后收入倒算个税,-2为年终奖税后收入倒算个税 Dim FenJie, ShuiLv, SuSuan FenJie = Array(0, 500, 2000, 5000, 20000, 40000, 60000, 80000, 100000) '收入分界 ShuiLv = Array(0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45) '各档税率 SuSuan = Array(0, 25, 125, 375, 1375, 3375, 6375, 10375, 15375) '各档扣除数 If FeiYong < 0 Then FeiYong = 0 ShouRu = ShouRu - FeiYong If ShouRu <= 0 Then GeShui = 0 Exit Function End If If LeiBie = 1 Then For i = 8 To 0 Step -1 If ShouRu > FenJie(i) Then GeShui = ShouRu * ShuiLv(i) - SuSuan(i) Exit For End If Next ElseIf LeiBie = 2 Then For i = 8 To 0 Step -1 If ShouRu / 12 > FenJie(i) Then GeShui = ShouRu * ShuiLv(i) - SuSuan(i) Exit For End If Next ElseIf LeiBie = -1 Then For i = 8 To 0 Step -1 If ShouRu > FenJie(i) - FenJie(i) * ShuiLv(i) + SuSuan(i) Then GeShui = (ShouRu * ShuiLv(i) - SuSuan(i)) / (1 - ShuiLv(i)) Exit For End If Next ElseIf LeiBie = -2 Then For i = 8 To 0 Step -1 If ShouRu > FenJie(i) * 12 - GeShui(FenJie(i) * 12, 0, 2) Then GeShui = (ShouRu * ShuiLv(i) - SuSuan(i)) / (1 - ShuiLv(i)) Exit For End If Next Else End If GeShui = Round(GeShui, 2) End Function
|