Rename Multiple work sheet
Murtaza,
I don't know how you can have square brackets in your sheet names, but this
code will loop through the sheets and remove "Trend" from the sheet names.
Sub test()
Dim sht As Worksheet
For Each sht In ThisWorkbook.Worksheets
sht.Name = Trim(Replace(sht.Name, "Trend", "", 1, -1, vbTextCompare))
Next sht
End Sub
--
Hope that helps.
Vergel Adriano
"Murtaza" wrote:
I have around 10 worksheets .....5 contains the word "[Trend]" in their
sheet name for example "Product1 [Trend]"
I want a Macro that can search for word "[Trend]" in available worksheets
and delete this word or replace it with some other text..so that worksheet
rename as "Product1".
Is it possible...?
Thank you,
Murtaza
|