Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default Compare two spreadsheets and eliminate duplicates

Happy to help.

JLGWhiz


"Joe_Hunt via OfficeKB.com" <u45578@uwe wrote in message
news:a62d9c526c47c@uwe...
That worked! Thanks a bunch. It wasn't exactly what I was looking for, but
it's actually better since I have a separate list of what the duplicates
were
now. I really appreciate it.

JLGWhiz wrote:
The code tests each cell in column A of sheet 2 for a match in column B of
sheet 1. If a match is found, it copies the entire row for the matched
item
to the new sheet "Dup_Dele",and then deletes that row from sheet 1, based
on
your statement that you wanted to delete duplicates from sheet 1.

The code displayed no errors when tested but line wrap in the news reader
often causes distorted results when pasting into a user's code window.

Sheets("Dup_Dele").Cells(Rows.Count, 2).End(xlUp).Offset(1,
0).Row)

This should all be on one line like:

Sheets("Dup_Dele").Cells(Rows.Count, 2).End(xlUp).Offset(1, 0).Row)

Or you can use a line attenuation like:

Sheets("Dup_Dele").Cells(Rows.Count, 2) _
.End(xlUp).Offset(1, 0).Row)

to make it easier to read in one pane.

For clarity sake, see if you can get the code to run on you system first,
then tell me how you want to re-arrange the results of the code.

I tried it and there was a syntax error on the section:

[quoted text clipped - 66 lines]
since
I'd need to put it back into Excel anyway. Thanks again.


--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/201004/1



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
eliminate duplicates on a sheet C. Brown Excel Worksheet Functions 3 April 5th 10 03:54 AM
How to eliminate everything but duplicates jtpryan Excel Worksheet Functions 2 February 17th 09 04:32 PM
Eliminate Duplicates Felix Excel Programming 8 May 4th 07 11:19 AM
Eliminate duplicates in mailing list AnneCir Excel Discussion (Misc queries) 7 April 4th 07 11:58 PM
Eliminate Duplicates in Pivot Table roadkill Excel Discussion (Misc queries) 2 February 3rd 06 06:13 PM


All times are GMT +1. The time now is 02:59 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"