Compare two sheets and paste in new sheet
Closed
Rav
-
Oct 11, 2009 at 01:16 AM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Oct 12, 2009 at 06:37 AM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Oct 12, 2009 at 06:37 AM
Related:
- Compare two sheets and paste in new sheet
- Sheet right to left in google sheet - Guide
- Windows network commands cheat sheet - Guide
- Mark sheet in excel - Guide
- How to open excel sheet in notepad++ - Guide
- Little alchemy cheat sheet - Guide
1 response
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Oct 12, 2009 at 06:37 AM
Oct 12, 2009 at 06:37 AM
try this macro (modify to suit you)
Sub test() Dim r As Range, c As Range, cfind As Range, x As Variant Worksheets("sheet3").Cells.Clear With Worksheets("sheet1") Set r = Range(.Range("A2"), .Range("A2").End(xlDown)) For Each c In r x = c.Value With Worksheets("sheet2").Columns("A:A") Set cfind = .Cells.Find(what:=x, lookat:=xlWhole) If Not cfind Is Nothing Then With Worksheets("sheet3") .Cells(Rows.Count, "A").End(xlUp).Offset(1, 0) = cfind End With 'sheet3 End If End With 'shee2 Next c End With 'sheet1 End Sub