ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Worksheet names (https://www.excelbanter.com/excel-discussion-misc-queries/64707-worksheet-names.html)

Ajay

Worksheet names
 
Afternoon All
Have looked through some of the previous threads but cant find exactly what
i am looking for.
Can I change part of a sheet name eg Gauge Recal 06-01-06 to Thread Recal
06-01-06?

In addition do this for all sheet names with Gauge at the front?

TIA
Ajay

JE McGimpsey

Worksheet names
 
One way:

Public Sub ChangeGaugeToThread()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
With ws
If .Name Like "Gauge*" Then _
.Name = "Thread" & Mid(.Name, 6)
End With
Next ws
End Sub

In article ,
"Ajay" wrote:

Afternoon All
Have looked through some of the previous threads but cant find exactly what
i am looking for.
Can I change part of a sheet name eg Gauge Recal 06-01-06 to Thread Recal
06-01-06?

In addition do this for all sheet names with Gauge at the front?

TIA
Ajay


Ajay

Worksheet names
 
Excellent so simple
Many thanks
Ajay

"JE McGimpsey" wrote:

One way:

Public Sub ChangeGaugeToThread()
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
With ws
If .Name Like "Gauge*" Then _
.Name = "Thread" & Mid(.Name, 6)
End With
Next ws
End Sub

In article ,
"Ajay" wrote:

Afternoon All
Have looked through some of the previous threads but cant find exactly what
i am looking for.
Can I change part of a sheet name eg Gauge Recal 06-01-06 to Thread Recal
06-01-06?

In addition do this for all sheet names with Gauge at the front?

TIA
Ajay




All times are GMT +1. The time now is 12:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com