六合开奖结果现场直播欢迎诸位!收藏本站注 册登 陆
常用三肖中特马:基础知识网络知识操作系统WPS网页制作数据库算法网页成功之路网络安全最新技术古典mid流行midmid背景下载中心
您现在的位置:首页 > 三肖中特马 > 文章页

使用Select Case计算所得税和计算反税宏代码

Admin | 2011-1-6 9:40:02 | ReadNums | 4549 | 标签 六合开奖结果现场直播 | 打印本页
     

  Option Explicit
  Function tax(Income As Double, Optional Tax_Standard As Integer = 2000) As Currency
  Dim SngBase As Currency '应纳税所得额
  Dim SngRate As Currency '税率
  Dim intTemp As Integer   '速算扣除数
  SngBase = Income - Tax_Standard
  Select Case SngBase
      Case Is <= 0
          SngRate = 0
          intTemp = 0
      Case Is <= 500
          SngRate = 0.05
          intTemp = 0
      Case Is <= 2000
          SngRate = 0.1
          intTemp = 25
      Case Is <= 5000
          SngRate = 0.15
          intTemp = 125
      Case Is <= 20000
          SngRate = 0.2
          intTemp = 375
      Case Is <= 40000
          SngRate = 0.25
          intTemp = 1375
      Case Is <= 60000
          SngRate = 0.3
          intTemp = 3375
      Case Is <= 80000
          SngRate = 0.35
          intTemp = 6375
      Case Is <= 100000
          SngRate = 0.4
          intTemp = 10375
      Case Is > 100000
          SngRate = 0.45
          intTemp = 15375
  End Select

  tax = Round(Abs(SngBase * SngRate - intTemp), 2)
     
  End Function

  Function FTax(tax As Double, Optional Tax_Standard As Integer = 2000) As Currency
  Dim SngBase As Currency
  Dim SngRate As Currency
  Dim intTemp As Integer

  SngBase = tax
  Select Case SngBase
      Case Is <= 0
          SngRate = 1
          intTemp = 0
      Case Is <= 25
          SngRate = 0.05
          intTemp = 0
      Case Is <= 175
          SngRate = 0.1
          intTemp = 25
      Case Is <= 625
          SngRate = 0.15
          intTemp = 125
      Case Is <= 3625
          SngRate = 0.2
          intTemp = 375
      Case Is <= 8625
          SngRate = 0.25
          intTemp = 1375
      Case Is <= 14625
          SngRate = 0.3
          intTemp = 3375
      Case Is <= 21625
          SngRate = 0.35
          intTemp = 6375
      Case Is <= 29625
          SngRate = 0.4
          intTemp = 10375
       Case Is > 29625
          SngRate = 0.45
          intTemp = 15375
  End Select
  FTax = Round(Abs(SngBase + intTemp) / SngRate, 2) + Tax_Standard
  End Function

  希望如上的宏代码函数对您有所帮助。


问题未解决:在线咨询

网友评论

(访客)
内容实用原创,讲得很好。
20xx年x月x日
(站长)
有问题请在线咨询。
20xx年x月x日