View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Pete
 
Posts: n/a
Default Function to find duplicate values, then delete

If the data is sorted, then in B2 you can enter this formula:

=IF(A2 = A1, "duplicate","unique")

and copy down to the bottom of your range of A values. Then you can use
autofilter on column B to select "duplicate". Highlight all the visible
rows and Edit | Delete Row. Then select All in the filter drop-down.

However, the same thing can be achieved by Advanced Filter - highlight
the data in column A (works better with a header), then Data | Filter |
Advanced Filter. Your range is already defined, tick Unique Records
only and decide if you want to filter in place or move the unique
records to another location (specify where). Then click OK and the
job's done.

Hope this helps.

Pete