1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| Sub Macro1()
Dim i As Integer: Dim drLig As Long
Rows("3:3").Select
Selection.AutoFilter
ActiveSheet.range("$A$3:$DN$2434").AutoFilter Field:=1, Criteria1:="FR"
Ligne = 4
Do While range("_FilterDataBase").Rows(Ligne).Hidden
Ligne = Ligne + 1
range("_FilterDataBase").Cells(Ligne, 16).Select
ActiveCell.FormulaR1C1 = _
"=1-COUNTIFS(BankHolidays!C3,Data!R2C[-42],BankHolidays!C2,Data!RC1)"
range("_FilterDataBase").Cells(Ligne, 16).Select
Selection.Copy
drcol = Cells(16, Cells.Columns.Count).End(xlToRight).Select
Loop
If .Cells(Ligne, 1).Value = "FR" Then
.Cells(Ligne, 16).EntireRow.Copy
NumLig = NumLig + 1
End If
End Sub |
Partager