shwetankbhardwaj
New Member
- Joined
- Apr 26, 2017
- Messages
- 20
Hi there,
I am using the below codes to get the job done.
Sub Updatesheetname()
Dim sht As Worksheet
For Each sht In Worksheets
sht.Range("F2").Formula = "=MID(CELL(""filename"",R[211]C[-5]),FIND(""]"",CELL(""filename"",R[211]C[-5]))+1,31)"
sht.Range("F2").Copy
Range("E2").Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 1).Select
Range(Selection, Selection.End(xlUp)).Select
sht.Paste
Next sht
End Sub
But the problem here is, its not working for all the worksheets. I want this coding to work with all the sheets (except "Master workbook" coz this contains macro buttons).
Thanks in advance!
Thanks,
Shwetank
I am using the below codes to get the job done.
Sub Updatesheetname()
Dim sht As Worksheet
For Each sht In Worksheets
sht.Range("F2").Formula = "=MID(CELL(""filename"",R[211]C[-5]),FIND(""]"",CELL(""filename"",R[211]C[-5]))+1,31)"
sht.Range("F2").Copy
Range("E2").Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 1).Select
Range(Selection, Selection.End(xlUp)).Select
sht.Paste
Next sht
End Sub
But the problem here is, its not working for all the worksheets. I want this coding to work with all the sheets (except "Master workbook" coz this contains macro buttons).
Thanks in advance!
Thanks,
Shwetank