Hello, how can I copy the filtered data inside a specific table instead of copying it in a regular range, for example tableau11
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
VBA Code:
Set SH1 = ThisWorkbook.Sheets("Recherche_ par date")
Set sh = ThisWorkbook.Sheets("Touts le valeurs ")
lastrow = sh.Cells(Rows.Count, "A").End(xlUp).Row
sh.Range("A8:ae" & lastrow).AdvancedFilter _
Action:=xlFilterCopy, _
CriteriaRange:=SH1.Range("AG1:AH2"), _
CopyToRange:=SH1.Range("A9:ae9"), _
Unique:=True
VBA Code:
Sheets("Touts le valeurs ").Range("Names[#All]").AdvancedFilter Action:= _
xlFilterCopy, CriteriaRange:=Range("'Recherche_ par date'!Criteria"), _
CopyToRange:=Range("A9:AE9"), Unique:=False