Rename the xls tab with spreadsheet column data using macro
Steps:
- Open the xls > go to view tab > click Marco > Type Macro name > Click create button > Ms visual basic screen will appear > copy paste below macro and save > close.
- Again click on view macro and select the saved macro and run it.
- It will rename the tab name w.r.t A1 column
- If you don’t want keep the macro in the xls, just delete b’coz people does't like opening any xls with macro
Sub Test()
For i = 1 To Sheets.Count
Worksheets(i).Name = Sheets(i).Range("A1").Value
Next
End Sub
- Open the xls > go to view tab > click Marco > Type Macro name > Click create button > Ms visual basic screen will appear > copy paste below macro and save > close.
- Again click on view macro and select the saved macro and run it.
- It will rename the tab name w.r.t A1 column
- If you don’t want keep the macro in the xls, just delete b’coz people does't like opening any xls with macro
Sub Test()
For i = 1 To Sheets.Count
Worksheets(i).Name = Sheets(i).Range("A1").Value
Next
End Sub
Comments
Post a Comment