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 37 38
| Sub Sauve()
'Macro enregitrée par jfo le 21/04/2015
If Weekday(Date) = vbSaturday Then
Dim DLig As Integer
With Sheets("Compteur") 'Sélectionne la feuille Compteur
DLig = .Range("A" & Rows.Count).End(xlUp).Row + 1 ' Positionne sur la bonne cellule
.Rows(DLig).Insert
'Recopie des formules
.Cells(DLig, "A") = Cells(DLig - 1, "A").Value
.Cells(DLig, "B").FormulaR1C1 = Cells(DLig - 1, "B").FormulaR1C1
.Cells(DLig, "D").FormulaR1C1 = Cells(DLig - 1, "D").FormulaR1C1
.Cells(DLig, "E").FormulaR1C1 = Cells(DLig - 1, "E").FormulaR1C1
.Cells(DLig, "G").FormulaR1C1 = Cells(DLig - 1, "G").FormulaR1C1
.Cells(DLig, "H").FormulaR1C1 = Cells(DLig - 1, "H").FormulaR1C1
.Cells(DLig, "I").FormulaR1C1 = Cells(DLig - 1, "I").FormulaR1C1
.Cells(DLig, "J").FormulaR1C1 = Cells(DLig - 1, "J").FormulaR1C1
'Récupération des données de la feuille "Récap Prises"
Sheets("Récap Prises").Cells(24, 8).Copy Sheets("Compteur").Cells(65535, 3).End(xlUp)(2)
Sheets("Récap Prises").Cells(37, 8).Copy Sheets("Compteur").Cells(65535, 6).End(xlUp)(2)
Application.CutCopyMode = False
End With
End If
Application.Wait "09:33:01"
Application.OnTime TimeValue("09:33:00"), "Sauve"
End Sub |
Partager