Sub Importer()
Dim col1%, col2%, a, ub%, util, d As Object, I&, tablo, resu(), j%, v As Variant, n&
col1 = 1: col2 = 6 'à adapter
a = Array(2, 3, 4, 6, 7, 8, 10, 11, 12) 'numéros des colonnes à copier
ub = UBound(a)
'---mémorise les utilisateurs---
util = Sheets("Utilisateurs").[A4].CurrentRegion.Resize(, 2)
Set d = CreateObject("Scripting.Dictionary")
For I = 2 To UBound(util)
d(UCase(util(I, 1)) & Chr(1) & util(I, 2)) = ""
Next I
'---tableau des résultats---
tablo = Sheets("BD_Compta").[A1].CurrentRegion.Resize(, a(ub))
ReDim resu(UBound(tablo), ub) 'base 0
For I = 2 To UBound(tablo)
If d.exists(UCase(tablo(I, col1)) & Chr(1) & tablo(I, col2)) Then
For j = 0 To ub
v = tablo(I, a(j))
If IsNumeric(v) Then resu(n, j) = CDbl(v) Else resu(n, j) = v
Next j
n = n + 1
End If
Next I
'---restitution---
With Sheets("Compta")
If .FilterMode Then .ShowAllData 'si la feuille est filtrée
If n Then .Cells(.Rows.Count, 4).End(xlUp)(2).Resize(n, ub + 1) = resu
End With
'---RAZ---
With Sheets("BD_Compta")
If .FilterMode Then .ShowAllData 'si la feuille est filtrée
.[A1].CurrentRegion.Offset(1).Delete xlUp
End With
End Sub