faster way to changing Sheet tab name

ianccy

Active Member
Joined
Jul 28, 2002
Messages
332
I want to change the Sheet name according to a column of data pasted to some cells,

I will paste the data to Sheet1 A1:A200, Sheet2 will be named "A1" , Sheet3 will be named "A2", and the rest of the sheets will be added and named,

How to do this,

Thanks for any help
 
Last edited:
Now if I have created 200 sheets with names with the method provided, now if i want to change all the sheets name with a new list of names without deleting this sheets , just renaming them by using data from Shee1 A column, how to do this?
 
Upvote 0

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
try this. It check number of rows in Column Q and if it >= 100 then copy Sheet Name to Sheet1

Code:
Option Explicit

Sub wsNameList()

Application.ScreenUpdating = False

Dim wsList As Worksheet, ws As Worksheet
Dim lSheetNameRow As Long

Set wsList = Sheet1

lSheetNameRow = 1

For Each ws In Sheets
    If Not ws.Name = wsList.Name Then
        If ws.Cells(10000, 17).End(xlUp).Row >= 100 Then
        wsList.Cells(lSheetNameRow, 1) = ws.Name
        lSheetNameRow = lSheetNameRow + 1
        End If
    End If
Next ws
   
Application.ScreenUpdating = True

End Sub




Hi skorpionkz, what code to delete the Sheets with less than 100 rows instead of just list the names in sheet1?
 
Upvote 0
you need just 1 little adjustment:

Rich (BB code):
Option Explicit

Sub wsNameList()

Application.ScreenUpdating = False

Dim wsList As Worksheet, ws As Worksheet
Dim lSheetNameRow As Long

Set wsList = Sheet1

lSheetNameRow = 1

For Each ws In Sheets
    If Not ws.Name = wsList.Name Then
        If ws.Cells(10000, 17).End(xlUp).Row >= 100 Then
        wsList.Cells(lSheetNameRow, 1) = ws.Name
        lSheetNameRow = lSheetNameRow + 1
        Else
        ws.Delete
        End If
    End If
Next ws
   
Application.ScreenUpdating = True

End Sub
 
Upvote 0
sure.

add line:
Rich (BB code):
Application.ScreenUpdating = False
Application.DisplayAlerts = False
and
Rich (BB code):
Application.ScreenUpdating = True
Application.DisplayAlerts = True
 
Upvote 0

Forum statistics

Threads
1,215,334
Messages
6,124,321
Members
449,154
Latest member
pollardxlsm

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top