Compare sheet 1 & Sheet 2 pull any items that
Closed
gregs
-
Mar 7, 2011 at 03:00 PM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Mar 7, 2011 at 09:38 PM
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Mar 7, 2011 at 09:38 PM
Related:
- Compare sheet 1 & Sheet 2 pull any items that
- Tentacle locker 2 - Download - Adult games
- Fnaf 1 download pc - Download - Horror
- Tentacle locker 1 - Download - Adult games
- Google sheet right to left - Guide
- Windows network commands cheat sheet - Guide
1 response
venkat1926
Posts
1863
Registration date
Sunday June 14, 2009
Status
Contributor
Last seen
August 7, 2021
811
Mar 7, 2011 at 09:38 PM
Mar 7, 2011 at 09:38 PM
quick reply see whether this works. if not post a very small extract of sheet1. 2 and what you expect in sheet 3
End Sub
Sub test() Dim rng As Range, c As Range, cfind As Range On Error Resume Next Worksheets("sheet3").Cells.Clear With Worksheets("sheet1") Set rng = Range(.Range("A2"), .Range("a2").End(xlDown)) For Each c In rng With Worksheets("sheet2") Set cfind = .Columns("A:A").Cells.Find _ (what:=c.Value, lookat:=xlWhole) If NOT cfind Is Nothing Then GoTo line1 cfind.Copy Worksheets("sheet3").Cells(Rows.Count, "A").End(xlUp).Offset(1, 0) End With 'sheet 2 line1: Next c application.cutcopymode=false End With 'sheet 1
End Sub