Hello -
I am trying to compare one column in 2 files in filtered worksheets ...if the row is 1 go to the next row. If the values are the same go to the next row…if not keep a count. So here is a little bit of the code
It seems to go through well comparing the first row ..then it goes to the next row in the first sheet Ok but then fails to go to next row in the second .
I figured it had something to do with the nested For Each ‘s because it will just keep looping between one file only.
Thanks !
I am trying to compare one column in 2 files in filtered worksheets ...if the row is 1 go to the next row. If the values are the same go to the next row…if not keep a count. So here is a little bit of the code
VBA Code:
For Each cell1 in Range1
For Each cell2 in Range2
if cell1.Offest (r, 13).row = 1 then
if cell2.offet (r, 13).row = 1 then
Else
End if
else
value1 = cell1.offset(r, 3).value
value2 = cell2.offset(r, 3).value
if value1 = value2
'go tk next row'
else
count = count + 1
end if
end if
next cell2
next cell1
It seems to go through well comparing the first row ..then it goes to the next row in the first sheet Ok but then fails to go to next row in the second .
I figured it had something to do with the nested For Each ‘s because it will just keep looping between one file only.
Thanks !