View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Charlie Charlie is offline
external usenet poster
 
Posts: 703
Default Deleting Duplicate Rows

This would be useful for me too. This is what I got:

Col A Col B

1 data
1 Dup
1 Dup
2 data
3 data
3
4 data
5 data
5 Dup
5 Dup

1) I don't see how to filter on True, and 2) I don't think it will give the
result he requested

and end with:

2 data
4 data




"Bob Phillips" wrote:

You don't need a macro.

In B1, add =IF(COUNTIF(A:A,A1)1,"Dup","")

Then put an autofilter on column B and filter to True

Delete all visible rows.

--
HTH

Bob Phillips

"RMort" wrote in message
...
I am totally new to macros and would like some assistance on a macro that
will look at a column of data and when it finds a duplicate, delete the
entire correspnding row. I've searched through the group and found ones

that
will delete just one of the 2 or more rows but I need them all deleted.

Here is an example

To start with:

1 data
1
1
2 data
3 data
3
4 data
5 data
5
5

and end with:

2 data
4 data

Thanks in advance for any help you can provide.