Advertisement
bousaid

Auto Calc: Saler + IEP + INDIC 2008 VBA

May 9th, 2022
993
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 = Round(Indic(Categori) * 0.05 * Echlon, 0)
  18. End Function
  19.  
  20. Function saler(Categori As Integer) As Currency
  21.     saler = Indic(Categori) * 45
  22. End Function
  23.  
  24. Function iep(Categori As Integer, Echlon As Integer) As Currency
  25.     iep = IepIndic(Categori, Echlon) * 45
  26. End Function
Advertisement
RAW Paste Data Copied
Advertisement