I have a process at work which involves importing a large number of worksheets from several workbooks in to one workbook (the master workbook). Most of the worksheet names are just numbers (integers) and should be unique. However in some cases there are duplicates, so for instance the number 100 might appear twice, so when I import it for the second time it appears as 100(2) since I can't have two worksheets with the same name.
I'd like some help writing a macro which checks worksheet names and can tell me if this has happened. I think it would work if the macro just looked for a bracket at the end of the worksheet name since a bracket should only be present if there was a duplicate name.
In English the code should do something like:
Obtain the next worksheet name
Check whether this ends in a bracket
If it does, record the name on the current worksheet (using xlup or something similar)
If not then move on to the next worksheet and check to see if the name ends with a bracket
Repeat until all worksheets have been assessed
Easy to state but I'm having problems getting it to work (not even sure how to start to be honest!)
Any help greatly appreciated. :-)
Rob
Bookmarks