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 26 27 28 29 30
|
Dim type_chaine_marche, entrainement_secondaire, genre_chaine_treuil, version_chaine_treuil, fs_sur_arbre, motorisation As String
Dim largeur As String
Dim pas_chaine_treuil As String
Dim i As Long
With Workbooks("catalogue_solutions.xls").Sheets("CODIFICATION")
i = 5
For i = 5 To 6
If .Range("D" & i).Value = type_chaine_marche And _
.Range("E" & i).Value = motorisation And _
.Range("F" & i).Value = entrainement_secondaire And _
.Range("G" & i).Value = largeur And _
.Range("H" & i).Value = genre_chaine_treuil And _
.Range("I" & i).Value = pas_chaine_treuil And _
.Range("J" & i).Value = version_chaine_treuil And _
.Range("K" & i).Value = fs_sur_arbre _
Then
code_machinerie = .Range("B" & i).Value
libelle_machinerie = .Range("C" & i).Value
Exit For
Else
code_machinerie = "A DEFINIR"
libelle_machinerie = "A DEFINIR"
End If
Next i
Application.Goto Reference:="valeur_code_machinerie"
ActiveCell.Value = code_machinerie
Application.Goto Reference:="libelle_code_machinerie"
ActiveCell.Value = libelle_machinerie
End With |
Partager