Macro To Delete Filtered Pivot Table Data

R

Roger

XL 2000
XP SP2

I created a Pivot table and now I want to filter or delete the results to
consolidate it further. The current results look like the following;

MID VID Cost Date
100 100 .12 05-05-06
100 112 .11 03-01-05
100 122 .09 01-02-03
101 150 .50 07-26-05
101 161 .55 06-25-02
102 170 .60 05-25-06
102 180 .61 05-02-06
102 192 .59 03-04-06
103 200 .80 05-30-06
103 205 .79 04-05-05
103 208 .78 02-25-04
103 300 .75 04-05-03

I have sorted the data so that the most recent date is always the first for
each MID number. I would like to be able to run a macro that will look at
the column of MID numbers that are the same and then delete all but the
first row of data. In other words it will delete the rows with the oldest
dates for each MID. It should look like the following:

MID VID Cost Date
100 100 .12 05-05-06
101 150 .50 07-26-05
102 170 .60 05-25-06
103 200 .80 05-30-06

I could manually delete each row but the list is over 3,000 rows.

Thanks for any help,

Roger
 

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