delete quintuplicate rows of data in spreadsheet

G

goognodoubt

After importing data from a daily racing form into an excel spreadsheet
I will have the lifetime past performance of up to 100 +- race horses
so Column A will contain as many as 15 to 20 races of the same (horse)
name even though the data in Column B through
...........................(whatever column) will be unique. I only need
to use 4 races from each horse, I would like a way to filter data so
that only 4 races of each horse are available, the rest will be
deleted. If exporting it into MS Access is a way to do it that is OK
too!!
 
D

David Biddulph

goognodoubt said:
After importing data from a daily racing form into an excel spreadsheet
I will have the lifetime past performance of up to 100 +- race horses
so Column A will contain as many as 15 to 20 races of the same (horse)
name even though the data in Column B through
..........................(whatever column) will be unique. I only need
to use 4 races from each horse, I would like a way to filter data so
that only 4 races of each horse are available, the rest will be
deleted. If exporting it into MS Access is a way to do it that is OK
too!!

I would have thought the easiest way was to have a column to produce a
sequence count of the occurrences of each name. So in row 9 you'd have
=COUNTIF(A$1:A9,A9), and you can copy that from top to bottom of your list.
If you then do an AutoFilter on the list & in your new column select Custom:
less than or equal to 4, that should do the trick. This won't actually
delete but just hide the rows, but you could use the filter the other way &
select "greater than or equal to" 5, and then delete the rows it selects.

You may wish to sort the list before you do the sequence count, so that you
can keep the 4 most recent, or whichever you want.
 

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