mbancrof
12-28-2018, 11:32 AM
I have a column which can contain several duplicates next to each other. Using VBA, I need to count them and make them unique by renaming them. Here's an example, say it's in Column B of Excel:
Docu0016.pdf
Docu0016.pdf
Docu0016.pdf
Docu0016.pdf
Docu0017.pdf
Docu0017.pdf
Docu0017.pdf
Docu0017.pdf
The macro would count the duplicates and make them unique by placing the count in parenthesis "()" at the end of the name. The results would look like this:
Docu0016.pdf
Docu0016(2).pdf
Docu0016(3).pdf
Docu0016(4).pdf
Docu0017.pdf
Docu0017(2).pdf
Docu0017(3).pdf
Docu0017(4).pdf
Any suggestions would be greatly appreciated!
Docu0016.pdf
Docu0016.pdf
Docu0016.pdf
Docu0016.pdf
Docu0017.pdf
Docu0017.pdf
Docu0017.pdf
Docu0017.pdf
The macro would count the duplicates and make them unique by placing the count in parenthesis "()" at the end of the name. The results would look like this:
Docu0016.pdf
Docu0016(2).pdf
Docu0016(3).pdf
Docu0016(4).pdf
Docu0017.pdf
Docu0017(2).pdf
Docu0017(3).pdf
Docu0017(4).pdf
Any suggestions would be greatly appreciated!