View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Sort by last update only - get rid of old ones

You could sort your data with a primary key of SKU number (ascending order) and
a secondary key of edition (but descending order)

So your data would look like:
10E01254 3 $840.00
10E01254 2 $850.00
10E01254 1 $850.00
12B01781 2 $180.00
12B01781 1 $160.00
12L13567 5 $950.00
12L13567 4 $760.00
12L13567 3 $725.00
12L13567 2 $725.00
12L13567 1 $725.00

Then in D1, put Keep (it's the first record that we want to keep)
In D2, put:
=if(a2=a1,"","Keep")
and drag down as far as you need.

Your test data looked like:
10E01254 3 $840.00 Keep
10E01254 2 $850.00
10E01254 1 $850.00
12B01781 2 $180.00 keep
12B01781 1 $160.00
12L13567 5 $950.00 keep
12L13567 4 $760.00
12L13567 3 $725.00
12L13567 2 $725.00
12L13567 1 $725.00

Then you can filter on column D to show the blanks and delete those visible
rows.

And then delete column D.



Compare Values wrote:

I have a very large worksheet that has multiple SKU's sorted by SKU then
Edition. I would like to get rid of the old Editions and just keep the
current one. On the exampe below, SKU 10E01254 has 3 editions I want to get
rid of 1 and 2 and keep the 3rd. all sku have multiple editions from 2 to 19
editions but I just one to keep on one spreadsheet the latest one on all SKU's
SKU Edition Price
10E01254 01 $850.00
10E01254 02 $850.00
10E01254 03 $840.00 Keep this

12L13567 01 $725.00
12L13567 02 $725.00
12L13567 03 $725.00
12L13567 04 $760.00
12L13567 05 $950.00 Keep this

12B01781 01 $160.00
12B01781 02 $180.00 Keep this


--

Dave Peterson