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 / New Users / September 2007

Tip: Looking for answers? Try searching our database.

Compare 2 sheets

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tim Rude - 29 Sep 2007 23:02 GMT
I've got 2 sheets, both of which have a column of 1500+ names, followed
by some columns of other info. The list of names in the two sheets are
mostly the same, but not every name will be in each list.

Sheet 1 also contains a 'Flag' column which will have either an "X" in
it or will be blank. List 2 also has the 'Flag' column but all fields in
it are blank.

For every name in Sheet 1 that has a matching name in Sheet 2, I need to
copy over the corresponding 'Flag' value, leaving the other data in
Sheet 2 intact and ignoring any names from Sheet 1 that aren't already
in Sheet 2.

For example:

Sheet 1 contains:
Doe, John    X    other sheet1 stuff
Jones, Sue          other sheet1 stuff
Smith, Bill    X    other sheet1 stuff  <- unique to S1
Wood, Jim  X    other sheet1 stuff

Sheet 2 contains:
Doe, John          other sheet2 stuff
Jones, Sue         other sheet2 stuff
Lee, Bob           other sheet2 stuff  <- unique to S2
Wood, Jim         other sheet2 stuff

I need to end up with:
Doe, John    X      other sheet2 stuff
Jones, Sue            other sheet2 stuff
Lee, Bob              other sheet2 stuff
Wood, Jim    X     other sheet2 stuff

How (using Excel 97 or 2000)?

Signature

Tim Rude

timrude@NOSPAM.hotmail.com
(remove NOSPAM. for correct email address)

Ken Johnson - 30 Sep 2007 00:59 GMT
> I've got 2 sheets, both of which have a column of 1500+ names, followed
> by some columns of other info. The list of names in the two sheets are
[quoted text clipped - 36 lines]
> timr...@NOSPAM.hotmail.com
> (remove NOSPAM. for correct email address)

Assuming the supplied sample data starts in A2 on sheet2 and sheet1,
try this formula in B2 on sheet2, filled down to B2000, or Bwhatever.

=IF(ISNA(VLOOKUP(A2,Sheet1!$A$2:$B$2000,2,FALSE)),"",IF(VLOOKUP(Sheet2!
A2,Sheet1!$A$2:$B$2000,2,FALSE)=0,"",VLOOKUP(Sheet2!A2,Sheet1!$A$2:$B
$2000,2,FALSE)))

Ken Johnson
Tim Rude - 30 Sep 2007 03:15 GMT
Thanks!

Signature

Tim Rude

timrude@NOSPAM.hotmail.com
(remove NOSPAM. for correct email address)

> > I've got 2 sheets, both of which have a column of 1500+ names, followed
> > by some columns of other info. The list of names in the two sheets are
[quoted text clipped - 39 lines]
> Assuming the supplied sample data starts in A2 on sheet2 and sheet1,
> try this formula in B2 on sheet2, filled down to B2000, or Bwhatever.

=IF(ISNA(VLOOKUP(A2,Sheet1!$A$2:$B$2000,2,FALSE)),"",IF(VLOOKUP(Sheet2!
> A2,Sheet1!$A$2:$B$2000,2,FALSE)=0,"",VLOOKUP(Sheet2!A2,Sheet1!$A$2:$B
> $2000,2,FALSE)))
>
> Ken Johnson

Rate this thread:






 
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.