find & replace??

  • Thread starter Thread starter L.
  • Start date Start date
L

L.

Every year I run into same problem/inconvenience.

Have a spread sheet set up with 12 monthly pages named Jan 200x, Feb 200x +
recap sheet and income sheet.

The first year this was setup was 2005.

Last year I manually renamed all pages and formulas to 2006.

Is they a "better/easier" way of changing all the 2006 to 2007?

L.
 
Ron said:
This may be too obvious to be the right answer, but....

If the workbook only contains data for a specific year,
why would you need more than the month in the tab name?

For example, if the workbook pertains to FY2006,
tabs name JAN, FEB....DEC would obvously contain data for that year, right?
After year-end, just SAVE AS the workbook to reference FY2007.

....or am I missing something?

***********
Regards,
Ron

XL2002, WinXP
Assuming there are only 12 sheets and each one has a name like "Jan
200x" then you could use a macro

Sub RenameSheets()
Dim sh As Worksheet
For Each sh In ActiveWorkbook.Sheets
sh.Name = Replace(sh.Name, "06", "07")
Next sh
End Sub
 
Actually, you're not, missing something....
Had a friend help set this up for me but your suggestion should work fine.

I've taken out the year's' and it appears the formulas picked up the
changes.
Everything appears to be working fine.

thanks,

L.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top