Multiple worksheet editing

  • Thread starter Thread starter Dan Wilson
  • Start date Start date
D

Dan Wilson

Good day. I am using Excel 2002. I have created a
template worksheet that was used to create 60 other
worksheets all using the original template as a starting
base. If I wish to make a format or formula change to the
template and then pass that change on to the individual
worksheets, how can I do that? Right now I am using a
macro with the original template open and then opening
each of the 60 worksheets, one at a time to make the
change.

There must be an easier way.

Thanks, Danno...
 
XL templates aren't attached to documents the way Word templates are. XL
templates are "fire and forget" files - XL makes a copy of the template
and names it with the templates name followed by a number.

Unless you can code the changes you want directly, you're probably
taking the right steps now. You can search the archives:

http://groups.google.com/advanced_group_search?q=group:*excel*

to find ideas on how to automate opening and changing all files in a
folder.
 
Dan,

You can use a macro to call your macro:

Sub RunMacroOnAllFilesInFolder()
With Application.FileSearch
.NewSearch
.LookIn = "C:\Excel"
.FileType = msoFileTypeExcelWorkbooks
If .Execute > 0 Then
For i = 1 To .FoundFiles.Count
Workbooks.Open .FoundFiles(i)
'Put your recurring macro code here
ActiveWorkbook.Close True
Next i
End If
End With
End Sub

HTH,
Bernie
MS Excel MVP
 
Good day Bernie, thanks for the quick response. I will
try your suggestion. It appears to be the answer as long
as I can put all of the worksheets needing to be changed
in one folder. That I can do.

Thanks, Danno...
 
Back
Top