Looking for .VBS script to open excel file and delete duplicate records
Posted on 2008-10-25
I am seeking a script written in Visual Basic (.VBS) that would be used during my automation process (all scripted) to delete duplicates. (Please note, not VBA)
Right now what I am doing is pulling from 8 different independent SQL databases through crystal and exporting each of the results from each db source into its own file. After that I merge them all to 1 single file, in some cases 1 file and multiple tabs (1 for each db source).
After the merge takes place the script I am now asking for would check the following criteria and delete any duplicates. There are more columns to this but I am listing only the columns I wish to check dupes for:
A. FIRST NAME B. LAST NAME C. ADDRESS D. CITY E. STATE F. ZIP G. PHONE NUMBER
The script should compare the above columns and delete any duplicates that all A-G items are an exact match. After these have all been deleted I would like it to save the file as deduped.myfile.xls.
Thank you for your help!