Help with a Macro to delete certain rows

james_gooding

New Member
Joined
Jan 26, 2005
Messages
3
Hello all. I've had a search to see if a similar question has been posed recently, but to no avail. So apologies if this has been answered recently, and any directons to such a post would be greatly appreciated.

I am a novice excel user, and musicmatch jukebox 10 has an excellent feature to write your entire music database to an xls spreadsheet. Here is a brief example of how it outputs it:

A B C D E F G H
Artist Album Genre Release Year Track Title Track # Time File Location

Anyway, ideally (for myself anyway), it would be better to dispense with things like track titles, track name, time and file location, to just display a list of all the artists, their albums, genre and release year.

So, would I be correct in assuming that I could build a macro that would allow me to delete all rows which have duplicate values in the album field, yet leave the first one ?

I'm also wondering which command(s) would be used in doing this ? I'm not looking for anyone to build this for me, I wouldn't expect that and it's more satisfying to do it yourself, but a shove in the right direction always helps :biggrin:

Thanks in advance if you got this far down and sorry for the babbling!
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
You could just use Advanced Filter to remove the duplicates. To do this, remove the columns you do not want. Then higlight the remaining data, go to Data->Filter->Advanced Filter, select "Copy to Another Location". Select "Unique Records Only", click on the toggle button next to "Copy To" and click on another cell, perhaps in a new column in row 1 and click OK. This will paste a copy of the data minus the duplicate rows.

This what you are looking to do?

Certainly can do the same thing with VBA though.
 
Upvote 0
Hmm, I think that might be just the solution i'm looking for, thanks vconfused :cool:

I'll give it a try and let you know how it went. Thanks a lot for your help!
 
Upvote 0

Forum statistics

Threads
1,222,017
Messages
6,163,411
Members
451,835
Latest member
kristianb63

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top