1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
|
Public Sub PrimePoste1()
Dim i As Long
Application.ScreenUpdating = False
For i = 9 To 32
If Cells(i, "F") <> "" Then
If Cells(i, "G") >= 5 Then
If Cells(i, "D") = "Grutier" Or Cells(i, "D") = "Centralier" Then
Cells(i, "H") = Cells(i, "G") * Cells(i, "G") / Range("G33") + 250
Else
Cells(i, "H") = Cells(i, "G") * Cells(i, "G") / Range("G33")
End If
Else
Cells(i, "H") = 0
End If
Else
Cells(i, "H") = 0
End If
Next
End Sub
Function Prime_1(Poste As String, Nom As String, Sem As Long, Prime As Double) As Double
If Nom <> "" Then
If Sem >= 5 Then
If Poste = "Grutier" Or Poste = "Centralier" Then
Prime_1 = Sem * Sem / Prime + 250
Else
Prime_1 = Sem * Sem / Prime
End If
Else:
Prime_1 = 0
End If
Else
Prime_1 = 0
End If
End Function |
Partager