A resource for users and developers of Microsoft Excel |
|||||||||
| Email us your FAQ suggestion. |
|||||||||
Visit often ! Pages are updated daily. |
|||||||||
This is the Excel "How to" Frequently Asked Questions page |
|||||||||
Answers to Frequently Asked Questions about how to do common tasks in Microsoft Excel. |
|||||||||
Excel "How to" FAQs |
| How to delete duplicate entries in a range? |
| Example |
In this example, you have a long list of items in column A starting in cell A1, where many items appear dozens or even hundreds of times in that list. You want to produce a list of unique items from that list.
|
| Manual |
To do this manually, the "Unique records only" feature in Advanced Filter is very useful. Select the column A header, and... In the Advanced Filter dialog, select the checkbox next to "Unique records only" and click OK. Then... In the GoTo Special dialog, select "Visible cells only" and click OK.
|
| VBA |
This macro will produce a unique list in place of the existing list. It runs quickly because it also uses Advanced Filter for Unique records. As always, try the macro on a test copy of your workbook first, to make sure it produces the result you want. Sub DeleteDuplicates()
|