If .Range("F" & i) > 60 Then
'Have to put the process for end of life goods parameters
If .Range("B" & i) = "LC_ALL" Then
'Count x
Do
If .Range("F" & i + x + 1) = "LC_ALL" Then Exit Do
x = x + 1
Loop While i + x < iRow
'
If x > 1 Then
'
iRow4 = iRow4 + 1
'Copy in the Results Sheets "Production Site"
.Range("A" & i).Copy Destination:=Sheets("Production Site").Range("I" & iRow4)
.Range("D" & i).Copy Destination:=Sheets("Production Site").Range("J" & iRow4)
.Range("W" & i).Copy Destination:=Sheets("Production Site").Range("K" & iRow4)
x = 0
'
Else
'
iRow5 = iRow5 + 1
'Copy in the Results Sheets "Market"
.Range("A" & i).Copy Destination:=Sheets("Market").Range("I" & iRow5)
.Range("B" & i).Copy Destination:=Sheets("Market").Range("J" & iRow5)
.Range("W" & i).Copy Destination:=Sheets("Market").Range("K" & iRow5)
x = 0
'
End If
'
Else
'
iRow5 = iRow5 + 1
.Range("A" & i).Copy Destination:=Sheets("Market").Range("I" & iRow5)
.Range("B" & i).Copy Destination:=Sheets("Market").Range("J" & iRow5)
.Range("W" & i).Copy Destination:=Sheets("Market").Range("K" & iRow5)
'
End If
J'ai adapté comme ça par rapport a ce que je veux.
Ceci n'est qu'une toute petite partie du code....
avec un message box j'ai regarder mes valeurs de x, et le probleme c'est qu'il n'est jamais egal à 1... il est egal a 597 puis diminue jusqu'à 3.
cest comme si il le comptait depuis le bas jusqu'à ma case. alors que je veux depuis ma case jusqua la suivante
Du coup j'avoue que je suis un peu perdu