Try this code
Option Explicit
Sub name_sheets()
Dim i As Long, a As Long
a = 1
With Worksheets("participants")
For i = 13 To 24
If Worksheets(a).Name <> "participants" Then
Worksheets(a).Name = .Range("B" & i).Value
a = a + 1
End If
Next i
End With
End Sub
Copy the Excel VBA code
Select the workbook in which you want to store the Excel VBA code
Hold the Alt key, and press the F11 key, to open the Visual Basic Editor
Choose Insert | Module
Where the cursor is flashing, choose Edit | Paste
To run the Excel VBA code:
Choose View | Macros
Select a macro in the list, and click the Run button
Bookmarks