Hi,
I have a workbook with 21 sheets, each sheet contains one section and the number of the section is in B1 for each sheet. It's under this format.
Section 1 Description of the section (variable number of character)
i was trying to rename each sheet with just the number of the section.
for example the name of the sheet that contains Section 1 would be "1". What i have so far renames the sheet with the word Section then the number.
but i want to get rid of the section, this is to then arrange the sheets in ascending order.
I have a workbook with 21 sheets, each sheet contains one section and the number of the section is in B1 for each sheet. It's under this format.
Section 1 Description of the section (variable number of character)
i was trying to rename each sheet with just the number of the section.
for example the name of the sheet that contains Section 1 would be "1". What i have so far renames the sheet with the word Section then the number.
Code:
'Rename each sheet
For Each ws In ActiveWorkbook.Worksheets
ws.Name = Replace(Right(ws.Range("B1"), 2), " ", "_")
Next ws