Macro or Script to delete ROW based on duplicate phone number

PHOTOMANSCOTT

New Member
Joined
Jul 4, 2008
Messages
1
Say I have a large CSV file of addresses with phone numbers, and some records might be duplicates. If I sort by the phone number; the duplicate records will appear in sequence... is there a way to HIGHLIGHT or MARK those particular rows for me to visually look at and decide which to delete or not?

Or, maybe the first pass thru the file could check for EXACT or CLOSE TO duplicate rows. And delete all dups except the first.

I am NEW to Excel (on a Mac) and not clear how to use macros.

Thanks for any direction.
Scott
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
It sounds like you don't need macros to do what you want.
Put conditional formatting on the column of phone numbers.
If A:A is the column of phone numbers, put this CF formula in A1,
=(1 < COUNTIF(A:A,A1))
and copy it to the other cells in the column.
It will highlight the duplicated phone numbers and sorting will bring them together for your inspection.
 
Upvote 0

Forum statistics

Threads
1,214,920
Messages
6,122,272
Members
449,075
Latest member
staticfluids

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