Microsoft Excel 2003 - Deleting rows

G

Guest

The Problem :

Suppose I have the following data arranged in rows.

5
2
3
3
3
3
4
2
3
3
3
4
5
6
6

I wish to delete duplicate values (rows) so that the list becomes :

5
2
3
4
2
3
4
5
6

I do not wish to delete for example all the 3's except one but delete all
duplicate 3's from each group of 3's leaving a single 3 in each group.
Similarly with other groups e.g in this case the number 6.
I want to automate this process.
Note all the groups contain consecutive duplicates.
Can this be done using an excel formula or excel function or vba code ?

I welcome any suggestions
 
B

Bob Umlas

Data/Filter/Advanced filter
Select Unique Records Only checkbox
Click OK, select the resultant cells, Copy/Paste elsewhere for your new
unique list.
Bob Umlas
Excel MVP
 
G

Guest

Thanks Bob - your answer is short , neat and does exactly what is required.

Many thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top