Hello, I have a sheet with 30.000 lines and columns from A to Y. On column C I have names, which repeat in different lines. The sheet is such that there are no duplicates when all lines and columns are considered. Whenever column C has duplicate names, I need the oldest lines deleted so that I only have the most recent line for each name. I tried deleting duplicates on column C, but excel will automaticaly shift names up after duplicates on that column are deleted, which messes with the correspondence of the other columns.

Could you suggest a way of having the oldest entries of each name deleted so as to have a list with only one, most recent, entrance for each name? Is there a way to have ecel delete duplicate names without shifitng cells up?

Thank you for your time,



You haven't said how you know which are the older names.  I will assume the first time a hit a name it needs to stay and all others are deleted

in column Z in Z2 put in


now drag fill this down to Z30000

select column Z and apply a filter (in Excel 2007, go to the home tab, then Sort & Filter and in the dropdown select filter.)

so now you should have a dropdown arrow in Z1.  Click on the arrow and select Delete.  Now only the rows to be deleted should be visible.  Select all the Data except Row 1 (your header row) and then go to the home tab, go to the cells button and select the delete dropdown and select entire rows.  

go the Sort & filter dropdown and select filter again and the filter will be removed.

You should now have the records you want to keep.

Test this on a copy of your workbook to make sure it does what you want.  

Again, I assumed you want to keep the first record/row of data that has that name.  If that is not the newest record, then the formula would need to be changed to accomodate whatever your rule is for identifying the newest record.  

Tom Ogilvy  
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here


All Answers

Answers by Expert:

Ask Experts


Tom Ogilvy


Selected as an Excel MVP by Microsoft since 1999. Answering Excel questions in Allexperts since its inception in 2001. Able to answer questions on almost all aspects of Excel's internal capabilities. If seeking a VBA solution, please specify that in your question itself so I give you the answer you want. [Excel has weak protection - if you are distributing an application, I don't answer questions on how to protect your project from your users.]


Extensive experience.

Master of Science (MS) degree Operations Research (ORSA)

Awards and Honors
Microsoft MVP in Excel.

©2016 About.com. All rights reserved.