Advertisement
bousaid

Auto Calc: Saler + IEP + INDIC 2008 VBA

May 9th, 2022 (edited)
2,759
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Function Indic(Categori As Integer)
  2.  
  3. Dim val As Integer
  4.     If Categori >= 11 And Categori <= 17 Then
  5.         val = 18
  6.     ElseIf Categori >= 9 And Categori <= 10 Then
  7.         val = 10
  8.     ElseIf Categori >= 7 And Categori <= 8 Then
  9.         val = 4
  10. Else
  11.     val = 0
  12. End If
  13. Indic = val + (Categori - 1) * 19 + 200 + (Categori - 2) * (Categori - 1)
  14. End Function
  15.  
  16. Function IepIndic(Categori As Integer, Echlon As Integer)
  17.     IepIndic = WorksheetFunction.RoundUp(Indic(Categori) * 0.05 * Echlon, 0)
  18.     If Categori = 8 And Echlon = 12 Then
  19.         IepIndic = IepIndic - 3
  20.     End If
  21. End Function
  22.  
  23. Function saler(Categori As Integer) As Currency
  24.     saler = Indic(Categori) * 45
  25. End Function
  26.  
  27. Function iep(Categori As Integer, Echlon As Integer) As Currency
  28.     iep = IepIndic(Categori, Echlon) * 45
  29. End Function
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement