Private Sub Workbook_Open()
With Worksheets("Feuil1")
.Protect "laetitia", UserInterfaceOnly:=True
End With
End Sub
Sub Formule()
Range("A1").Select
ActiveCell.FormulaR1C1 = "=R6C27+R6C28"
End Sub
.Range(.Cells(6, 39), .Cells(L, 39)).Select
Selection.Cut
.Cells(6, 39).Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
.Range(.Cells(6, 40), .Cells(L, 40)).FormulaR1C1 = "=RC[3]+RC[8]+RC[9]+RC[10]"
.Range(.Cells(6, 39), .Cells(L, 39)).Select
Selection.Copy
.Cells(6, 39).Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
For Each cel In .Range(.Cells(6, 40), .Cells(L, 40))
cel.Formula = "=($AQ6+$AV6+$AW6+$AX6)"
Next cel
L = 6
For Each cel In .Range(.Cells(6, 40), .Cells(L, 40))
cel.Formula = "=($AQ" & L & "+$AV" & L & "+$AW" & L & "+$AX" & L & ")"
L = L + 1
Next cel