Sub Macro1()
Dim myarray
Dim chemin As String
myarray = Array('Couv', 'Vrai')
ChDir ThisWorkbook.Path
For L = 0 To 1
Workbooks.Open FileName:=myarray(L) & '.xls'
With Workbooks(myarray(L) & '.xls').Sheets(1)
derlgn = .Range('A65536').End(xlUp).Row
Maplage = .Range('A12:J' & derlgn).Select
Selection.Copy
End With
Application.ScreenUpdating = False
With Workbooks('pointage.xls').Sheets(1)
.Activate
derlgn = .Range('A65536').End(xlUp).Row
.Range('A' & derlgn).Select
ActiveSheet.Paste
Application.CutCopyMode = False
Columns(6).ClearContents
Range('F1').Select
ActiveCell.FormulaR1C1 = '=IF(RC[-1]<0,''-'',''+'')'
derlgn = .Range('E65536').End(xlUp).Row
Range('F1').Select
Selection.AutoFill Destination:=Range('F1:F' & derlgn)
End With
With Workbooks(myarray(L) & '.xls')
.Saved = True
.Close
End With
Next
Application.ScreenUpdating = True
Cells.Select
Selection.Sort Key1:=Range('M1'), Order1:=xlDescending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End Sub