manrique83
Programmer
Hi,
I am looping through the array and comparing values but it doesn't seem to work? Can someone please help? Ive looked at it for hours and Im sure its something dumb.
For i = 1 To y
If myArray(i, 4) <> myArray((i + 1), 4) Then
For j = 1 To y
For k = 1 To 4
ThisWorkbook.Worksheets("Move").Cells(a, k).Value = myArray(j, k)
Next k
a = a + 1
Next j
Exit For
End If
Next i
I am looping through the array and comparing values but it doesn't seem to work? Can someone please help? Ive looked at it for hours and Im sure its something dumb.
For i = 1 To y
If myArray(i, 4) <> myArray((i + 1), 4) Then
For j = 1 To y
For k = 1 To 4
ThisWorkbook.Worksheets("Move").Cells(a, k).Value = myArray(j, k)
Next k
a = a + 1
Next j
Exit For
End If
Next i