Sub EssaiSupLigneCleArrayColFonction()
Set f = Sheets("bd")
Tbl1 = f.Range("A2:D" & f.[A65000].End(xlUp).Row).Value
clé = "Paris": colclé = 3: colRécup = Array(1, 2, 4, 3)
Tbl = SupArrayCléCol(Tbl1, clé, colclé, colRécup)
f.[G2].Resize(UBound(Tbl), UBound(Tbl, 2) - LBound(Tbl, 2) + 1) = Tbl
End Sub
Function SupArrayCléCol(Tbl, clé, colclé, colRécup)
n = 0
For i = LBound(Tbl) To UBound(Tbl)
If Tbl(i, colclé) <> clé Then n = n + 1
Next i
j = 0
Dim Tbl2(): ReDim Tbl2(1 To n, LBound(colRécup) To UBound(colRécup))
For i = LBound(Tbl) To UBound(Tbl)
If Tbl(i, colclé) <> clé Then
j = j + 1
For k = LBound(colRécup) To UBound(colRécup): Tbl2(j, k) = Tbl(i, colRécup(k)): Next k
End If
Next i
SupArrayCléCol = Tbl2
End Function