1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
| Sheets("Resultats").Select
Range("B9:B100").Select
ActiveWorkbook.Names.Add Name:="liste", RefersToR1C1:="=Resultats!R9C2:R100C2" 'selection appelée liste
Sheets("Feuil2").Select
Range("E2,H2").Select
With Selection.Validation 'création menu déroulant
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=liste"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
Range("G2").Select 'recherche v sur la colonne G
ActiveCell.FormulaR1C1 = _
"=VLOOKUP(R2C6,Resultats!R9C2:R100C113,Feuil2!R[1]C[-6],FALSE)"
Selection.AutoFill Destination:=Range("G2:G100") |
Partager