Sub Macro1()
Dim DerLig As Integer, DerLigMA As Integer, DerLigLO As Integer, i As Integer, j As Integer
Dim TabMA(), TabLO(), IndMA As Integer, IndLO As Integer
With Worksheets("Inscriptions")
DerLig = .Range("A" & Rows.Count).End(xlUp).Row
ReDim TabMA(DerLig, 5)
ReDim TabLO(DerLig, 5)
For i = 2 To DerLig ' pour chaque ligne d'inscription
If .Cells(i, 1) = "MA" And .Cells(i, 5) = Date Then ' si col A = MA et col E date du jour
For j = 0 To 4 'mise de la ligne dans un tableau
TabMA(IndMA, j) = .Cells(i, j + 1)
Next
IndMA = IndMA + 1
End If
If .Cells(i, 1) = "LO" And .Cells(i, 5) = Date Then
For j = 0 To 4
TabLO(IndLO, j) = .Cells(i, j + 1)
Next
IndLO = IndLO + 1
End If
Next
End With
'**** transfert des tableaux dans les feuilles respectives
With Worksheets("Publi_MA")
DerLigMA = .Range("A" & Rows.Count).End(xlUp).Row
.Cells(DerLigMA + 1, 1).Resize(UBound(TabMA, 1), UBound(TabMA, 2)).Value = TabMA
End With
With Worksheets("Publi_LO")
DerLigLO = .Range("A" & Rows.Count).End(xlUp).Row
.Cells(DerLigLO + 1, 1).Resize(UBound(TabLO, 1), UBound(TabLO, 2)).Value = TabLO
End With
End Sub