![]() |
renaming sheets
How do I rename a worksheet like this:
Original name + (Year-1) I want to save some worksheets when a new year starts and use the old name again on a new empty sheet |
renaming sheets
Sub RenameSheet()
x = WorksheetFunction.Text(Now(), "YYYY") - 1 ActiveSheet.Name = ActiveSheet.Name & " " & x End Sub This code performs this operation on the current activesheet somethinglikeant |
renaming sheets
Hi Kjeldc
Try this ActiveSheet.Name = ActiveSheet.Name & " " & Year(Date) - 1 -- Regards Ron de Bruin http://www.rondebruin.nl "Kjeldc" wrote in message ... How do I rename a worksheet like this: Original name + (Year-1) I want to save some worksheets when a new year starts and use the old name again on a new empty sheet |
renaming sheets
Thank you, both of you. Just what I wanted ;-)
"Ron de Bruin" skrev: Hi Kjeldc Try this ActiveSheet.Name = ActiveSheet.Name & " " & Year(Date) - 1 -- Regards Ron de Bruin http://www.rondebruin.nl "Kjeldc" wrote in message ... How do I rename a worksheet like this: Original name + (Year-1) I want to save some worksheets when a new year starts and use the old name again on a new empty sheet |
renaming sheets
Helpful as always.
Thanks, wal50 "Ron de Bruin" wrote: Hi Kjeldc Try this ActiveSheet.Name = ActiveSheet.Name & " " & Year(Date) - 1 -- Regards Ron de Bruin http://www.rondebruin.nl "Kjeldc" wrote in message ... How do I rename a worksheet like this: Original name + (Year-1) I want to save some worksheets when a new year starts and use the old name again on a new empty sheet |
All times are GMT +1. The time now is 12:33 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com