Hi,
I am puzzle with a for loop.
I need to check if the current row col A match current row + 1 col A and so forth for another 3 more column
I know that current row col A data differs from current row +1 col A but it get ignored at the end and I am trying to figure this one out. I am missing something but ???
current row : AA
current row +1 :AA
current row +2 : total
This is the loop I currently use
thanks
I am puzzle with a for loop.
I need to check if the current row col A match current row + 1 col A and so forth for another 3 more column
I know that current row col A data differs from current row +1 col A but it get ignored at the end and I am trying to figure this one out. I am missing something but ???
current row : AA
current row +1 :AA
current row +2 : total
This is the loop I currently use
Code:
INumFin = 767
INumDep = 769
For i = INumFin To INumDep - 1
If Range("A" & INumFin).Value <> Range("A" & INumFin + 1).Value Then 'And _
' Range("B" & INumFin) <> Range("B" & INumFin + 1) And _
' Range("D" & INumFin) <> Range("D" & INumFin + 1) And _
' Range("E" & INumFin) <> Range("E" & INumFin + 1) * -1 Then
iLgDiff = fDiff.Range("A1").CurrentRegion.Rows.Count + 1
'Copie des lignes trouvées vers la feuille Différences
Range("A" & INumFin & ":F" & INumDep).Copy fDiff.Range("A" & iLgDiff)
Range("E" & INumFin).Select
End If
Next i
thanks
Last edited: