I have a code that is able to rename the active sheet (in this case, sheet 1) to the value in the A1 cell of the active sheet. I'd like to write a function to be able to do this for every sheet in the Excel workbook. Where sheet 1 name will be the value of cell A1 on sheet 1, sheet 2 name will be the value of cell A1 on sheet 2, and so on.
Is it as simple as counting the number of sheets in the workbook and adding this to a range Worksheets(1:TotalCount)?
Sub RenameSheet()
Worksheets(1).Select
Range("A1").Select
ActiveSheet.Name = ActiveCell.Value
End Sub