Hello Uberathlete,
This macro will cahnge the all the worksheets names using the convention described in your post. You show only 3 letters of the symbol being used, so the macro will use only a maximum of 3 characters for the symbol. You can run the macro using ALT+F8 to display the Macro Dialog List, and run the macro by selecting it from the list.
Sub RenameWorksheets()
Dim strDay As String
Dim strMonth As String
Dim strYear As String
Dim Symbol As String
Dim Wks AS Worksheet
For Each Wks In Worksheets
With Wks
If IsDate(.Range("A2")) Then
With .Range("A2")
strMonth = Format(.Value, "mmm")
strDay = Format(.Value, "d")
strYear = Format(.Value "yy")
End With
With Range("B2")
If Len(.Value) < 3 Then
Symbol = .Value
Else
Symbol = Left(.Value, 3)
End If
End With
.Name = Symbol & strMonth & strDay & "." & strYear
End If
End With
Next Wks
End Sub
To Install the Macro:
1. Copy the Macro code above using CTRL+C
2. Open Excel and Right Click on any Sheet Tab
3. Click on View Code in the pop up menu
4. Use ALT+I to activate the VBE Insert Menu
5. Press the letter m to insert a Standard Module
6. Paste the macro code using CTRL+V
7. Save the macro using CTRL+S
8. Close the VBE and return to excel using ALT+Q
Sincerely,
Leith Ross
Bookmarks