Bonjour,
bonjour forum,
mon problème est le suivant :
Je cherche à extraire des données selon certaines conditions à deux (2) feuilles (Fac1)et (Fac2)qui sont la même structure
je utilise ce code:
Sub Etablir()
Dim Ws As Worksheet
Dim Nblg As Long
Set Ws = ThisWorkbook.Worksheets("Fac1")
Application.ScreenUpdating = False
Ws.Range("A21:E35").ClearContents
With ThisWorkbook.Sheets("Service")
If .AutoFilterMode = True Then .AutoFilterMode = False
Nblg = .Range("A" & Rows.Count).End(xlUp).Row
.Range("A1:F" & Nblg).AutoFilter field:=6, Criteria1:=Ws.Range("E14")
If Application.Subtotal(103, .Columns("F")) > 1 Then
.Range("A2:E" & Nblg).SpecialCells(xlCellTypeVisible).Copy
Ws.Range("A21").PasteSpecial xlPasteValues
End If
End With
End Sub
je tiens à vous remercier pour votre aide et votre soutien
Bien cordialement,