May 04 2021 09:05 PM
May 04 2021 09:05 PM
I have a sales report content with multiples sheets (around 60 sheets), and each sheets are referring to a shop, and the sheet auto named with the numeric number (eg. 001, 002, 003 ) after generated from the system.
Actually, each sheet content the respective shop names under cell B5, sales man and the sales amount, is there any fast way to rename the individual tabs (aka sheets ) based on the cell B5?
May 04 2021 10:07 PM
This needs VBA Macro:
Sub RenameSheets()
For i = 1 To Sheets.Count
If Worksheets(i).Range("B5").Value <> "" Then
Sheets(i).Name = Worksheets(i).Range("B5").Value
End If
Next
End Sub
How it works:
N.B. This will work only, if each sheet has name in cell B5.