K
kelyos
Guest
Tout est dans le titre, quand je veux afficher les lignes de la feuille positionsMOT sur une condition avec la feuille principale avec la boucle j (alors qu'avec la boucle i ca marche bien) ca ne marche pas et ne m'affiche pas ligne par ligne les bonnes info, est ce normal ? merci d'avance
Private Sub CommandButton1_Click()
Dim cellule As Range
Dim j As Integer
Dim i As Integer
Dim mot As Range
Set mot = Cells.Find(Range("B7").Value)
For i = 7 To 8
For j = 2 To 3
If Application.Worksheets("positionsMOT").Range("H" & j) = mot Then
Range("C" & i) = Application.Worksheets("positionsMOT").Range("B" & j)
Range("D" & i) = Application.Worksheets("positionsMOT").Range("M" & j)
End If
Next
Next
End Sub
Private Sub CommandButton1_Click()
Dim cellule As Range
Dim j As Integer
Dim i As Integer
Dim mot As Range
Set mot = Cells.Find(Range("B7").Value)
For i = 7 To 8
For j = 2 To 3
If Application.Worksheets("positionsMOT").Range("H" & j) = mot Then
Range("C" & i) = Application.Worksheets("positionsMOT").Range("B" & j)
Range("D" & i) = Application.Worksheets("positionsMOT").Range("M" & j)
End If
Next
Next
End Sub