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
Avinash SinghAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

abbas abdullaCommented:
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)
Debug.Print rng2.Rows(x).Address
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

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Avinash SinghAuthor Commented:
thnx alot sir for giving ur precious time in this post
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VBA

From novice to tech pro — start learning today.