Related:
- Compare and update excel sheet
- Mark sheet in excel - Guide
- How to open excel sheet in notepad++ - Guide
- How do i update my facebook account to new version and design - Guide
- How to screenshot excel sheet - Guide
- Play store update - Guide
2 responses
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Jul 16, 2009 at 05:53 AM
Jul 16, 2009 at 05:53 AM
sheet 1 is master sheet and sheet 2 is the other sheet .
modify the macro to suit your
modify the macro to suit your
Sub test()
Dim rng1 As Range, c1 As Range, cfind As Range, x As String
On Error Resume Next
With Worksheets("sheet1")
Set rng1 = Range(.Range("a2"), .Range("a2").End(xlDown))
For Each c1 In rng1
x = c1.Value
'MsgBox x
With Worksheets("sheet2").Columns("A:A")
Set cfind = .Cells.Find(what:=x, lookat:=xlWhole)
If cfind Is Nothing Then
GoTo line1
Else
GoTo line2
End If
End With
line1:
'MsgBox c1.Value c1.EntireRow.Copy
With Worksheets("sheet2")
.Cells(Rows.Count, "a").End(xlUp).Offset(1, 0).PasteSpecial
End With
line2:
Next c1
End With
Application.CutCopyMode = False
End Sub