How to detect if a double array (2D) has duplicates In Visual Basic -
just trying detect if double array has in each row consecutive duplicates in it. im not sure why code isnt working, highly appreciated
r integer = 0 num - 1 dim rowclashes integer = 0 c1 integer = 0 num - 2 c2 integer = c1 + 1 num - 1 if myteacherarray(r, c1) = myteacherarray(r, c2) rowclashes += 1 end if next next messagebox.show("period " & r & ":" & rowclashes) next
thanks
your code looks if loop through rows, , in each row check if there more 1 cell given value (i.e. 2 or more cells equal).
if correct, note 3 loops run same limit, meaning num - 1
. table of same number of rows , columns? if not, there have 1 error.
since not explaining why does not work, can't elaborate further.
Comments
Post a Comment