dstrickland91
New Member
- Joined
- Jun 12, 2015
- Messages
- 19
Hi all,
Yesterday I received help on here with a piece of code that inserts a letter before all my existing sheet names. I typically have 26 sheets in a file named with a number that represent the amount of records in that sheet. So before I run the code that inserts the letter, many of the sheets have the same amount of records so the sheet name will be something like 76(2).
Due to me running the code that inserts a letter into the sheet name, they no longer have duplicate names afterwards, so the duplicate (2) or (3) is no longer needed, but often after I insert the letter, 15-20 of the sheets will have a (2),(3) and so on after them. Is there anyway to have a code that goes through and removes all the (2) or (3)s in the sheetnames with VBA so I dont have to click each sheet name and delete manually?
Example
A76
B54
C76(2)
D76(3)
E84
F77
G84(2)
Afterwords would be
A76
B54
C76
D76
E84
F77
G84
I appreciate any help. Thanks
Yesterday I received help on here with a piece of code that inserts a letter before all my existing sheet names. I typically have 26 sheets in a file named with a number that represent the amount of records in that sheet. So before I run the code that inserts the letter, many of the sheets have the same amount of records so the sheet name will be something like 76(2).
Due to me running the code that inserts a letter into the sheet name, they no longer have duplicate names afterwards, so the duplicate (2) or (3) is no longer needed, but often after I insert the letter, 15-20 of the sheets will have a (2),(3) and so on after them. Is there anyway to have a code that goes through and removes all the (2) or (3)s in the sheetnames with VBA so I dont have to click each sheet name and delete manually?
Example
A76
B54
C76(2)
D76(3)
E84
F77
G84(2)
Afterwords would be
A76
B54
C76
D76
E84
F77
G84
I appreciate any help. Thanks