Bonjour Daniel,
Si j'ai bien compris, si la saisie est un nombre on filtre sur la colonne 11, sinon la colonne 15
Donc voici une possibilité
Sub EXTRACTION()
Dim Critere$, LR As Long
Dim Col As Long
With ThisWorkbook.Worksheets("Extraction")
LR = .Cells(.Rows.Count, 2).End(xlUp).Row
Critere = .TextBox1.Value
End With
' Si le critère est un nombre = colonne 11, sinon colonne 15
If IsNumeric(Critere) Then Col = 11 Else Col = 15
' Filtrer selon la colonne
With Workbooks("stock-d85.xls").Worksheets(1).UsedRange
.AutoFilter Col, "*" & Critere & "*"
Application.Union(.Columns(15), .Columns(14), .Columns(11), .Columns(17)).Offset(1).Copy
Workbooks("stock-d85.xls").Worksheets(1).AutoFilterMode = False
ThisWorkbook.Worksheets("Extraction").Cells(LR, 2).Offset(1).PasteSpecial xlPasteValues
End With
Application.CutCopyMode = False
End Sub
Sinon, pourquoi ne pas mettre une combo pour choisir la colonne de recherche
A+