realniceguy5000
Board Regular
- Joined
- Aug 19, 2008
- Messages
- 148
Hi, I need some help. I have 2 worksheets I need to check. i need to loop through sheet1 column a, find same value on sheet2 column a then somehow loop through each column on sheet1 same row and check the row that was found on sheet2 each column to make sure they match if they dont match then I need to mark the cells on both sheets and continue checking the values accross the entire row. Once done checking if they dont match move the rows to sheet3
Here is what I came up with so far but I am stuck.
Thanks for any help
Here is what I came up with so far but I am stuck.
Thanks for any help
Code:
Sub ColumnChecks()
colcount = 1
With Sheets(1)
Lrow1 = .Cells(Rows.Count, 1).End(xlUp).Row
Lcol1 = .Cells(1, 256).End(xlToLeft).Column
For x = Lrow1 To 2 Step -1
For y = 1 To Lcol1
'.Cells(x, y).Select
Set c = .Cells(x, y)
With Sheets(2)
.Select
Set cfind = .Columns(1).Cells.Find(what:=c.Value, lookat:=xlWhole)
'not sure what now as I found the row on the 2 sheet but have to loop through values on the first sheet and loop
' through this row on the 2nd sheet
End With
Next y
Next x
End With
End Sub