|
不要这么复杂吧
- Function grsds(myssr) As Double
- tj1 = "myssr <= 1500 and myssr > 0"
- sl1 = 0.03
- kcs1 = 0
- tj2 = "myssr < = 4500 and myssr > 1500"
- sl2 = 0.1
- kcs2 = 105
- tj3 = "myssr < = 9000 and myssr > 4500"
- sl3 = 0.2
- kcs3 = 555
- tj4 = "myssr < = 35000 and myssr > 9000"
- sl4 = 0.25
- kcs4 = 1005
- tj5 = "myssr < = 55000 and myssr > 35000"
- sl5 = 0.3
- kcs5 = 2755
- tj6 = "myssr < = 80000 and myssr > 55000"
- sl6 = 0.35
- kcs6 = 5505
- tj7 = "myssr > 80000 "
- sl7 = 0.45
- kcs7 = 13505
- If myssr > 80000 Then
- mdj = 7
- Else
- If myssr <= 80000 And myssr > 55000 Then
- mdj = 6
- Else
- If myssr <= 55000 And myssr > 35000 Then
- mdj = 5
- Else
- If myssr <= 35000 And myssr > 9000 Then
- mdj = 4
- Else
- If myssr <= 9000 And myssr > 4500 Then
- mdj = 3
- Else
- If myssr <= 4500 And myssr > 1500 Then
- mdj = 2
- Else
- If myssr <= 1500 And myssr > 0 Then
- mdj = 1
- End If
- End If
- End If
- End If
- End If
- End If
- End If
- Select Case mdj
- Case 7
- mtax = myssr * sl7 - kcs7
- Case 6
- mtax = myssr * sl6 - kcs6
- Case 5
- mtax = myssr * sl5 - kcs5
- Case 4
- mtax = myssr * sl4 - kcs4
- Case 3
- mtax = myssr * sl3 - kcs3
- Case 2
- mtax = myssr * sl2 - kcs2
- Case 1
- mtax = myssr * sl1 - kcs1
- End Select
- grsds = Application.WorksheetFunction.Round(mtax, 2)
-
- End Function
复制代码 看看这个如何
- ROUND(MAX(应纳税额*0.05*{0.6,2,4,5,6,7,9}-5*{0,21,111,201,551,1101,2701},0),2)
复制代码 |
|