1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| Sub CommandButton1_Click()
espece = ComboBox4.Value
cyc = ComboBox5.Value
apprstade = ComboBox6.Value
stade = ComboBox7.Value
Dim rngData As Range, rngLabelRow1 As Range, rngLabelRow2 As Range, rngLabelRow3 As Range, rngLabelRow4 As Range, rngLabelColumn As Range, fn As WorksheetFunction
Set fn = Application.WorksheetFunction
With ThisWorkbook.Worksheets("Feuil2")
Set rngData = .Range("G2:N73")
Set rngLabelRow1 = .Range("A2:A73")
Set rngLabelRow2 = .Range("B2:B73")
Set rngLabelRow3 = .Range("C2:C73")
Set rngLabelRow4 = .Range("D2:D73")
Set rngLabelColumn = .Range("G1:N1")
]End With
With fn
UFLA = .Index(rngData, .Match(espece, rngLabelRow1, 0), .Match(cyc, rngLabelRow2, 0), .Match(apprstade, rngLabelRow3, 0), .Match(stade, rngLabelRow4, 0), .Match("UFL", rngLabelColumn, 0))
End With
End Sub |
Partager