Sub numref()
Dim base As Range, cel As Range, cat As Range
Range("B1:B" & [B65000].End(xlUp).Row).Name = "cat"
Range("A1:B" & [B65000].End(xlUp).Row).Name = "base"
[G1] = [B1]
Range("cat").AdvancedFilter Action:=xlFilterCopy, CopyToRange:=Range( _
"G1"), Unique:=True
For Each cel In Range("G2:G" & [G65000].End(xlUp).Row)
[G2] = cel
With Sheets(cel.Value)
Range("base").AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Sheets("Données").Range("G1:G2"), CopyToRange:=.Range("A1"), _
Unique:=False
End With
Next cel
Columns(7).ClearContents
End Sub