View Full Version : deleting rows if duplicate


swarv
08-13-2010, 01:01 AM
Hi all,

I was wondering is there a way of deleting rows where there is a duplicate.

i.e.
1 a a a
2 a a a
3 b b b
4 b b b

I would like it to delete rows 2 and 4 leaving just 1 row in that has the data in.

Thanks

Martin

Trevor G
08-13-2010, 03:20 AM
depending on which version of MS Office depends on where to find the function.

In Excel 2007 you would highlight our table then select the Data Tab, and on the right there is the Data Tools and in there is an icon that states Remove Duplicates. When you select this feature you can select which column (s) to check for.

chergh
08-13-2010, 03:43 AM
You can also use the special filter in earlier versions of excel

swarv
08-13-2010, 04:47 AM
thats great. didn't know that function was there.

Rx_
08-24-2010, 07:39 AM
That is something else in Excel 2007 to try.
Turned on the recorder and this is what came out.
Might have to consider this fore some future automated reports


Range("B3:B10").Select
ActiveSheet.Range("$B$3:$B$10").RemoveDuplicates Columns:=1, Header:=xlNo