Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 151
Default Copying large number of sheets

Hi,

I have a spreadsheet which contains a summary page and a number of branch
sheets (each should be on a separate tab).

How do I replicate the branch sheets automatically (there are 50 of them
needed) without having to copy it 50 times?

Is there a way I can name each of the tabs automatically too, i.e with their
branch name? (Andover; Southampton etc etc)

Thanks

Amanda
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default Copying large number of sheets

i would have a templet and then copy it like below. you need to havve a list
of branch names. You may want to do this as part of importing the data from
some external source.

Sub CopyBranch()

Set BranchRange = Sheets("sheet1").Range("A1:A20")


For Each cell In BranchRange

Worksheets("templet").Select
Worksheets("templet").Copy After:=Sheets("templet")
ActiveSheet.Name = cell

Next cell


End Sub


"Amanda" wrote:

Hi,

I have a spreadsheet which contains a summary page and a number of branch
sheets (each should be on a separate tab).

How do I replicate the branch sheets automatically (there are 50 of them
needed) without having to copy it 50 times?

Is there a way I can name each of the tabs automatically too, i.e with their
branch name? (Andover; Southampton etc etc)

Thanks

Amanda

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 151
Default Copying large number of sheets

Thanks for this joel,

Where do I type this information in to to get it to run the query, is it a
macro?

Thanks

Amanda

"Joel" wrote:

i would have a templet and then copy it like below. you need to havve a list
of branch names. You may want to do this as part of importing the data from
some external source.

Sub CopyBranch()

Set BranchRange = Sheets("sheet1").Range("A1:A20")


For Each cell In BranchRange

Worksheets("templet").Select
Worksheets("templet").Copy After:=Sheets("templet")
ActiveSheet.Name = cell

Next cell


End Sub


"Amanda" wrote:

Hi,

I have a spreadsheet which contains a summary page and a number of branch
sheets (each should be on a separate tab).

How do I replicate the branch sheets automatically (there are 50 of them
needed) without having to copy it 50 times?

Is there a way I can name each of the tabs automatically too, i.e with their
branch name? (Andover; Southampton etc etc)

Thanks

Amanda

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default Copying large number of sheets

I didn't know whre the dta was coming from. I will help you if you like.
Record a macro while doing one query, then we can modify the recorded macro
to do all the queries. You will need to have a column on one worksheets
witth all the branch names.

you start recording tthe macro by going to Tools Menu - Macro - Record new
Macro.

Then do one query for a branch.

Affter doing the query then go back to Tools Menu - Macro -Stop Recording.

Next post macro on website. To get macro right click on tab at bottom of
worksheet and selct veiw code. then on left side of screen in Project
manager select Module 1.
"Amanda" wrote:

Thanks for this joel,

Where do I type this information in to to get it to run the query, is it a
macro?

Thanks

Amanda

"Joel" wrote:

i would have a templet and then copy it like below. you need to havve a list
of branch names. You may want to do this as part of importing the data from
some external source.

Sub CopyBranch()

Set BranchRange = Sheets("sheet1").Range("A1:A20")


For Each cell In BranchRange

Worksheets("templet").Select
Worksheets("templet").Copy After:=Sheets("templet")
ActiveSheet.Name = cell

Next cell


End Sub


"Amanda" wrote:

Hi,

I have a spreadsheet which contains a summary page and a number of branch
sheets (each should be on a separate tab).

How do I replicate the branch sheets automatically (there are 50 of them
needed) without having to copy it 50 times?

Is there a way I can name each of the tabs automatically too, i.e with their
branch name? (Andover; Southampton etc etc)

Thanks

Amanda

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default Copying large number of sheets

did you get your query to work with a macro?

"Amanda" wrote:

Thanks for this joel,

Where do I type this information in to to get it to run the query, is it a
macro?

Thanks

Amanda

"Joel" wrote:

i would have a templet and then copy it like below. you need to havve a list
of branch names. You may want to do this as part of importing the data from
some external source.

Sub CopyBranch()

Set BranchRange = Sheets("sheet1").Range("A1:A20")


For Each cell In BranchRange

Worksheets("templet").Select
Worksheets("templet").Copy After:=Sheets("templet")
ActiveSheet.Name = cell

Next cell


End Sub


"Amanda" wrote:

Hi,

I have a spreadsheet which contains a summary page and a number of branch
sheets (each should be on a separate tab).

How do I replicate the branch sheets automatically (there are 50 of them
needed) without having to copy it 50 times?

Is there a way I can name each of the tabs automatically too, i.e with their
branch name? (Andover; Southampton etc etc)

Thanks

Amanda

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Weird vlookups and formulas on large sheets Devnull Excel Discussion (Misc queries) 1 October 2nd 06 11:55 PM
Copying Formulas in LARGE Files busman Excel Worksheet Functions 3 January 20th 06 06:49 PM
How to calculate average from large dataset in several sheets? Orf Excel Worksheet Functions 2 December 12th 05 10:59 AM
Getting error "selection is too large" when copying data Tootie Excel Discussion (Misc queries) 1 October 6th 05 12:19 AM
Getting error "selection is too large" when copying data Tootie Excel Discussion (Misc queries) 0 October 5th 05 08:42 PM


All times are GMT +1. The time now is 04:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"