I have a workbook with 30+ tabs. Each tab name has reference to a department number in it (Ex #,003,#,#,#,# ~ where '003' is the department). I would like to create a macro to loop through all of the tabs in the workheet and depending on the Department, have it change the tab name to the name of the department.
In the example above, the tab with '003' would be changed to 'Marketing'.
I have a list (mapping table) and thought I would probably use the Select Case to change the tab number to the Department name. (I had it working with an IF statement, but had to manually switch tabs and run macro on each tab. It's a killer to do this! Here's what the IF example lookes like:
If ActiveSheet.Name Like "*001*" Then
ActiveSheet.Name = "Accounting"
ElseIf ActiveSheet.Name Like "*002*" Then
ActiveSheet.Name = "Administration"
ElseIf ActiveSheet.Name Like "*003*" Then
ActiveSheet.Name = "Marketing"
ElseIf ActiveSheet.Name Like "*003*" Then
End if