if a sheet has duplicates rows then put the summary in sheet2

if a sheet has duplicates rows then put the summary in sheet2
I need this type of result
all this I have to do by vba only
this highlighted colour is only for understanding purpose
see the sample file
Avinash SinghAsked:
Who is Participating?

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

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.

Martin LissOlder than dirtCommented:
I assume this is homework so please show what you have so far.
Avinash SinghAuthor Commented:
I am new to vba Martin Sir
This is not a homework
I am doing some work and for the same i need the code
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
You may try something like this...
Sub CheckForDuplicateRow()
Dim sws As Worksheet, dws As Worksheet
Dim i As Long, j As Long
Dim x, y(), dict
Dim str As String
Application.ScreenUpdating = False

Set sws = Sheets("Sheet1")
Set dws = Sheets("Sheet2")
x = sws.Range("A1").CurrentRegion.Value
ReDim y(1 To UBound(x, 1), 1 To 1)
Set dict = CreateObject("Scripting.Dictionary")
For i = 1 To UBound(x, 1)
    str = Join(Application.Index(x, i, 0), ",")
    If Not dict.exists(str) Then
        dict.Item(str) = i
        j = j + 1
        y(j, 1) = "Row" & dict.Item(str) & "=Row" & i
        dict.Item(str) = i
    End If
Next i
dws.Range("A1").Resize(j, 1) = y
Application.ScreenUpdating = True
End Sub

Open in new window

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 Neeraj sir for ur great support and Thnx for giving ur precious time to this post
Subodh Tiwari (Neeraj)Excel & VBA ExpertCommented:
You're welcome Avinash!
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

From novice to tech pro — start learning today.