Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / March 2008

Tip: Looking for answers? Try searching our database.

Compare

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Srenfro - 11 Mar 2008 19:18 GMT
I have an excell workbook that has 2 sheets i use them for part #'s and i
want to have all of the part #s that have the same part # on bolth sheets to
be put on a new sheet sheet 3 is there a way to do this??
Otto Moehrbach - 11 Mar 2008 23:02 GMT
One way:
Run this macro.
I assumed your part numbers are in Column A in both sheets and you want the
numbers in the third sheet to be in Column A.  I also assumed your sheets
are named "One", "Two", and "Three".  Change these as necessary.  HTH  Otto
Sub CopyDups()
     Dim rColAOne As Range
     Dim rColATwo As Range
     Dim Dest As Range
     Dim i As Range
     Sheets("One").Select
     Set rColAOne = Range("A2", Range("A" & Rows.Count).End(xlUp))
     With Sheets("Two")
           Set rColATwo = .Range("A2", .Range("A" & Rows.Count).End(xlUp))
     End With
     Set Dest = Sheets("Three").Range("A2")
     For Each i In rColAOne
           If Not rColATwo.Find(What:=i.Value, LookAt:=xlWhole) Is Nothing
Then
                 i.Copy Dest
                 Set Dest = Dest.Offset(1)
           End If
     Next i
End Sub

>I have an excell workbook that has 2 sheets i use them for part #'s and i
> want to have all of the part #s that have the same part # on bolth sheets
> to
> be put on a new sheet sheet 3 is there a way to do this??
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.