#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Compare

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??
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,071
Default Compare

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

"Srenfro" wrote in message
...
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??



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
compare worksheets Ivano Excel Discussion (Misc queries) 13 October 16th 07 11:33 AM
Compare CribbsStyle Excel Worksheet Functions 8 November 4th 06 10:15 PM
How do I compare cells and if FALSE compare to next cell in EXCEL Cindie Excel Worksheet Functions 0 March 24th 06 05:29 PM
Compare & Delete Centrol Excel Discussion (Misc queries) 2 September 26th 05 07:17 AM
compare dansd Excel Worksheet Functions 1 December 21st 04 12:19 PM


All times are GMT +1. The time now is 01:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"