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
| Dim DerLigA As Long
DerLigA = Cells(Rows.Count, 1).End(xlUp).Row
'condition heure 100%
Range("L13").Select
ActiveCell.FormulaR1C1 = _
"=IF(SUMIFS(R13C6:R" & DerLigA & "C6,R13C1:R" & DerLigA & "C1,RC[-1])>35,35,SUMIFS(R13C6:R" & _
DerLigA & "C6,R13C1:R" & DerLigA & "C1,RC[-1]))"
'condition heure 125%
Range("M13").Select
ActiveCell.FormulaR1C1 = _
"=IF(SUMIFS(R13C6:R" & DerLigA & "C6,R13C1:R" & DerLigA & "C1,RC[-2])>39,39-35,IF(SUMIFS(R13C6:R" & DerLigA & "C6,R13C1:R" & DerLigA & "C1,RC[-2])<35,""""))"
'condition heure 150%
Range("N13").Select
ActiveCell.FormulaR1C1 = _
"=IF(SUMIFS(R13C6:R" & DerLigA & "C6,R13C1:R" & DerLigA & "C1,RC[-3])>39,SUMIFS(R13C6:R" & DerLigA & "C6,R13C1:R" & DerLigA & "C1,RC[-3])-39,IF(SUMIFS(R13C6:R" & DerLigA & "C6,R13C1:R" & DerLigA & "C1,RC[-3])<35,""""))"
'somme heure 100%
Range("L13").Select
Selection.AutoFill Destination:=Range("L13:L" & DerLigA & ""), Type:=xlFillDefault
Range("L13:L" & DerLigA & "").Select
'somme heure 125%
Range("M13").Select
Selection.AutoFill Destination:=Range("M13:M" & DerLigA & ""), Type:=xlFillDefault
Range("M13:M" & DerLigA & "").Select
'somme heure 150%
Range("N13").Select
Selection.AutoFill Destination:=Range("N13:N" & DerLigA & ""), Type:=xlFillDefault
Range("N13:" & DerLigA & "").Select ' j'ai un bogue ici. ce que j'ai fais au dessus est-ce bon ? |
Partager