# what I want is compare sheet1 each complete row with sheet2 complete rows if the data are same so put true in sheet3 and if it false then put false in sheet3

what I want is compare sheet1 each complete row with sheet2 complete rows if the data are same so put true in sheet3 and if it false then put false in sheet3
comparing sheet1 each row data with all rows in sheet2
means compare sheet1 1st complete row data with sheet2 1st row data ,and then compare sheet1 1st row data with sheet2 2nd row data and so on…….
see the attachment
result.xlsm
###### Who is Participating?

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
Hi,
Check this code
``````Sub CompareMyDataByRows()
Dim ary1() As Variant, ary2() As Variant
Dim rng1 As Range, rng2 As Range, Sheet1RowNumber As Range, Sheet2RowNumber As Range
Set rng1 = Sheets("Sheet1").Range("A1:L16")
Set rng2 = Sheets("Sheet2").Range("A1:L16")

For x = 1 To 6

For i = 1 To 6

Set Sheet1RowNumber = rng1.Rows(x)
Set Sheet2RowNumber = rng2.Rows(i)
ary1 = Application.Transpose(Application.Transpose(Sheet1RowNumber))
ary2 = Application.Transpose(Application.Transpose(Sheet2RowNumber))
Sheet1RowTxt = Join(ary1, "")
Sheet2RowTxt = Join(ary2, "")
u = Len(Sheet1RowTxt)
Debug.Print Sheet1RowTxt, Sheet2RowTxt
If Sheet1RowTxt = Sheet2RowTxt And u > 0 Then
Sheets("Sheet3").Cells(x, 2).Value = "True"
GoTo ExitLoop
ElseIf u <> 0 Then
Sheets("Sheet3").Cells(x, 2).Value = "False"

End If

Next
ExitLoop:
Next

End Sub
``````
0

Experts Exchange Solution brought to you by