View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Deleting Duplicate Rows

in sheet2 put a formula in column 3

=if(countif(Sheet1!A:A,A1)0,"Keep","Delete")

You can copy this down the column, then use the Autofilter to extract the
rows you want.

Use the same approach in a macro.

--
Regards,
Tom Ogilvy

Connie wrote in message
...
I've not had success using the macros listed to delete
rows where the first cell is the same. For example,

* Sheet1 has name in column 1 (shorter file)
* Sheet2 has name in column 1 and address in column 2
(longer file)

I want Sheet1 to drive the selection of rows in Sheet2,
resulting in a name and address subset file of Sheet2.

Thank you,
Connie