Rename worksheet
Hi
I need to create a macro that renames each worksheet to the contents in cell A1 of each worksheet. Any suggestions will be welcome. Thanks |
Rename worksheet
-----Original Message----- Hi I need to create a macro that renames each worksheet to the contents in cell A1 of each worksheet. Any suggestions will be welcome. Thanks Try this, i havent tested it myself. . For each ws in activeworkbook ws.name= ws.range("a1") next ws |
Rename worksheet
That should be
Dim ws as Worksheet For each ws in activeworkbook.worksheets ws.name= ws.range("a1").value next ws -- Regards, Tom Ogilvy "nathan" wrote in message ... -----Original Message----- Hi I need to create a macro that renames each worksheet to the contents in cell A1 of each worksheet. Any suggestions will be welcome. Thanks Try this, i havent tested it myself. . For each ws in activeworkbook ws.name= ws.range("a1") next ws |
Rename worksheet
Perfect!
Works a treat Thanks. "Tom Ogilvy" wrote in message ... That should be Dim ws as Worksheet For each ws in activeworkbook.worksheets ws.name= ws.range("a1").value next ws -- Regards, Tom Ogilvy "nathan" wrote in message ... -----Original Message----- Hi I need to create a macro that renames each worksheet to the contents in cell A1 of each worksheet. Any suggestions will be welcome. Thanks Try this, i havent tested it myself. . For each ws in activeworkbook ws.name= ws.range("a1") next ws |
All times are GMT +1. The time now is 08:27 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com