08-26-2013, 03:42 AM
(This post was last modified: 08-26-2013, 03:44 AM by Novemberrain81.)
Do the following. Create excelobject then create one object for each workbooks. Then find the row and column count for both of the files. If those counts do not match then the data aren't equal. Either way do a for loop and you compare data cell by cell.
Do a nested for loop if you want it to go left to right...IE
(1,1)(1,2)(1,3) so on
Do a nested for loop if you want it to go left to right...IE
(1,1)(1,2)(1,3) so on
Code:
usedrowoflist1 = objWSlist1.Usedrange.Rows.Count
For i=2 to usedrowoflist1
For j=1 to usedcolumnoflist1
If objWSlist1.cells(i, j) = objWSlist2.cells(i,j) Then
Do whatever you have to do if passes.
Else
Do whatever you have to do if fails
End If
Next
Next