Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Removing copies of the same row

Status
Not open for further replies.

kampho

Civil/Environmental
Apr 10, 2003
5
0
0
AU
I have a large spreadsheet that has a lot of double-up data (multiple rows with exactly the same data). I will be using the spreadsheet to create an ASCII file and then a cad file and any double-up data will also carry through to the CAD file. I am looking for a command in EXCEL that will automatically search through the spreadsheet and remove any occasions where rows with the same data are repeated.

Any ideas?
 
Replies continue below

Recommended for you

writing vba code would be cumbersome and maybe risky as some data may be removed that is needed.

perhaps you can try using the autofilter criteria (menu commands: Data-> Auto Filter). be certain to select the continuous columns in which to filter the criteria before activating the auto filter capabilities.
you can then delete duplicated rows.

this technique maybe time-consuming as well.
again, i'm handicaped as this pc does not have excel on it, so testing the theory is impractical.

how about the subtotal capabilities?

question for you, why is the data in excel duplicated in the first place? take care of the source and simplify the use of excel - a suggestion.
regardless, good luck!
-pmover
 
Thanks guys

The way i actually solved the problem was to write an if statement. The statement simply printed "DUPLICATE" if two concurrent rows were the same or "OK" if they were different. I then sorted by the column that had the "DUPLICATE" and "OK" text and deleted all of the "DUPLICATE" rows. It worked very quickly and very effectively. I had thought that there would have been some form of magic excel command that would have deleted duplicate data but it appears not.
 
Another method you might consider in future is to use the Advanced Filter (Data > Filter > Advanced Filter). By selecting the options "Copy into a new location" and "Unique records only", you can extract only the unique rows from your original data.
 
Status
Not open for further replies.
Back
Top