Copying existing sheets to another Workbook

I need help copying an existing sheet along with the links on that
sheet to another workbook.   I have two workbooks, say Workbook1 and
Workbook2.  They are the same exact workbooks with the same worksheets
in them, the same layout.  Only the data is different.  In workbook 1 I
have inserted a sheet that summarizes the data from the other sheets in
that workbook.  Now I want to copy that sheet to Workbook2 so that I
don't have to make a summary page for Workbook2.

The problem is that the sheet has links in it and when I copy and/or
move the sheet to the new workbook those links are still linked to the
old workbook.

Is there a function or command that I am supposed to use when doing
this so that the links are dynamic to the workbook it is being copied
to?

Thanks for the help.
Steve Monczka
smonczka@hotmail.com

0
smonczka (53)
6/14/2005 6:48:09 PM
excel 39879 articles. 2 followers. Follow

7 Replies
505 Views

Similar Articles

[PageSpeed] 37

Have both WBs open.
Right click in the tab of the "Summary" sheet and choose "Move or Copy".
Expand the "To Book" box, and click on the name of the new WB.
Click in "Create A Copy", then <OK>.

You're now in the new WB.
<Edit> <Links>
In the "Source File" window, you'll see the name of the old WB.
Click the "Change Source" button.
You'll now see a listing of all the WBs in the folder.
Simply click on the name of the new WB, then <OK>.
Your Source File window should now be empty, since there are now *no*
external links, since all links are now self-contained.
-- 
HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================


"Smonczka" <smonczka@hotmail.com> wrote in message
news:1118774889.816715.106420@f14g2000cwb.googlegroups.com...
> I need help copying an existing sheet along with the links on that
> sheet to another workbook.   I have two workbooks, say Workbook1 and
> Workbook2.  They are the same exact workbooks with the same worksheets
> in them, the same layout.  Only the data is different.  In workbook 1 I
> have inserted a sheet that summarizes the data from the other sheets in
> that workbook.  Now I want to copy that sheet to Workbook2 so that I
> don't have to make a summary page for Workbook2.
>
> The problem is that the sheet has links in it and when I copy and/or
> move the sheet to the new workbook those links are still linked to the
> old workbook.
>
> Is there a function or command that I am supposed to use when doing
> this so that the links are dynamic to the workbook it is being copied
> to?
>
> Thanks for the help.
> Steve Monczka
> smonczka@hotmail.com
>

0
ragdyer1 (4060)
6/14/2005 7:20:42 PM
RD,

Thanks for the help and that works perfectly, but would you know of a
quicker way to do it?  I have 83 workbooks I have to do this for and I
want to try to get home by XMass.

Thanks again for your sugestion.
Steve

0
smonczka (53)
6/14/2005 7:31:10 PM
Can you put those 83 workbooks, er, copy those 83 workbooks to their own
dedicated folder?

If you can then maybe a macro could go through and do all the work.

I like to just change my formulas to text (mass change = to $$$$$=).  Then copy
the sheet.  Since the cells contain text--there are no links back to the old
workbook.  Then just one more mass change ($$$$$= back to =) and the formulas
come back to life.

But please make sure that the worksheets with the correct names are in the
receiving workbook.  Else you'll have lots of dialogs to dismiss.

And if you copy those 83 workbooks to that new folder, if this doesn't work for
you, you can just remove that folder!

Option Explicit
Sub testme01()

    Dim MstrSummaryWks As Worksheet
    
    Dim tempWkbk As Workbook
    
    Dim myNames() As String
    Dim fCtr As Long
    Dim myFile As String
    Dim myPath As String
   
    'change to point at the folder to check
    myPath = "C:\my documents\excel\test"
    If Right(myPath, 1) <> "\" Then
        myPath = myPath & "\"
    End If
    
    myFile = Dir(myPath & "*.xls")
    If myFile = "" Then
        MsgBox "no files found"
        Exit Sub
    End If
    
    'get the list of files
    fCtr = 0
    Do While myFile <> ""
        fCtr = fCtr + 1
        ReDim Preserve myNames(1 To fCtr)
        myNames(fCtr) = myFile
        myFile = Dir()
    Loop

    If fCtr > 0 Then
        'Change to match the summary worksheet name.
        Set MstrSummaryWks = ThisWorkbook.Worksheets("summary")
        'change all formulas to text
        MstrSummaryWks.Cells.Replace what:="=", replacement:="$$$$$=", _
            lookat:=xlPart, MatchCase:=False
                
        For fCtr = LBound(myNames) To UBound(myNames)
            Set tempWkbk = Workbooks.Open(Filename:=myPath & myNames(fCtr))
            With tempWkbk
                MstrSummaryWks.Copy _
                    after:=.Sheets(.Sheets.Count)
            End With
            
            ActiveSheet.Cells.Replace what:="$$$$$=", replacement:="=", _
                lookat:=xlPart, MatchCase:=False
                                
            tempWkbk.Close savechanges:=True

        Next fCtr
        
        MstrSummaryWks.Cells.Replace what:="$$$$$=", replacement:="=", _
            lookat:=xlPart, MatchCase:=False
    End If
    
End Sub

This code goes into the workbook that has the master summary worksheet--but it's
not in that same folder as the other 83.

Smonczka wrote:
> 
> RD,
> 
> Thanks for the help and that works perfectly, but would you know of a
> quicker way to do it?  I have 83 workbooks I have to do this for and I
> want to try to get home by XMass.
> 
> Thanks again for your sugestion.
> Steve

-- 

Dave Peterson
0
ec357201 (5290)
6/14/2005 8:18:59 PM
Dave actualy your idea about using a search and replace, changing the
formulas to text worked great.  Wonderful idea. Thank you.

Steve

P.S.  Man I have to say that is too cool of you to write out that much
code.  Thanks so much for your time and effort.  I think I can acutaly
use that code to do something else I have been trying to do.  I'll let
you know how it turns out.  

Thanks again.
Steve

0
smonczka (53)
6/14/2005 8:44:17 PM
You did 83 workbooks manually????

Wow!

Smonczka wrote:
> 
> Dave actualy your idea about using a search and replace, changing the
> formulas to text worked great.  Wonderful idea. Thank you.
> 
> Steve
> 
> P.S.  Man I have to say that is too cool of you to write out that much
> code.  Thanks so much for your time and effort.  I think I can acutaly
> use that code to do something else I have been trying to do.  I'll let
> you know how it turns out.
> 
> Thanks again.
> Steve

-- 

Dave Peterson
0
ec357201 (5290)
6/14/2005 8:51:46 PM
No not really, but I have you to thank for that.  I set up a Personal
macro that converted the formulas in the sheet to text by placing the
"=" sign at the end of the formula.  Opened up ten or so sheets at a
time.  Then had the macro grab the text from my original sheet, make a
new sheet called summary in the open workbook, copy the text there,
then convert the "######=" to "=######" so the formulas came back and
save the open sheet and go to the next sheet.

The beautiful thing about macros is that if you can imagine it you can
do it.  You just have to have someone give you a push in the right
direction.
It took me about 20 minutes to do the whole thing.

Thanks again for your help.

Steve

P.S. Now all I have to do is get the company to invest in a DBA so I
can get rid of the 83 sheets in the first place.

0
smonczka1 (8)
6/15/2005 12:00:23 AM
Not too much time to finish it all off.

So that's good.

smonczka wrote:
> 
> No not really, but I have you to thank for that.  I set up a Personal
> macro that converted the formulas in the sheet to text by placing the
> "=" sign at the end of the formula.  Opened up ten or so sheets at a
> time.  Then had the macro grab the text from my original sheet, make a
> new sheet called summary in the open workbook, copy the text there,
> then convert the "######=" to "=######" so the formulas came back and
> save the open sheet and go to the next sheet.
> 
> The beautiful thing about macros is that if you can imagine it you can
> do it.  You just have to have someone give you a push in the right
> direction.
> It took me about 20 minutes to do the whole thing.
> 
> Thanks again for your help.
> 
> Steve
> 
> P.S. Now all I have to do is get the company to invest in a DBA so I
> can get rid of the 83 sheets in the first place.

-- 

Dave Peterson
0
ec357201 (5290)
6/15/2005 12:42:34 PM
Reply:

Similar Artilces:

GAL and another Address Book
I've taken the address book from WinFax and exported into a .csv file. I've imported this into a .pst profile. Now I'd like to have this "address book" of thousands of Fax Numbers available through the Exchange Server (Address Book) so users can access it easily through the Create a Fax Wizard in SBS 03, instead of sharing out one workstations book and going down that road. Is this possible and if so, is there any documentation I haven't found to do it? Thanks in advance. Joseph. Copy the items from the .pst folder into a contacts folder under Public = Fold...

DVD Copy Pro for Mac
[b]DVD Copy Pro for Mac[/b] is a DVD copy software that can support D9 to D5 compression. With simple operation, it can save DVD in four different ways including directly burning to DVD disc, saving as DVD folder, copying into DVD media format that can be played by DVD Player directly, and converting as ISO file for easy movie management. Now this cool Mac DVD Copy also supports the latest released Snow Leopard. You can download [b][url=http://www.dvd-copy-mac.net/download/dvd-copy-pro-mac.zip]DVD Copy Pro for Mac[/url][/b] freely right now. [b]More information:[/b][quote]http://www.dvd-...

how can you re-number multiple sheets 'automatically'?
I have a large worksheet with a large number (100+) of sheets that I would like to rename/renumber and don't want to do it one-by-one. I.e. change from Sheet 1, Sheet 2, etc to just 1,2,3,.... If your sheets are named Sheet1, Sheet2 etc without the spaces shown in your post then you can use a macro like this to change the names: Sub ChangeNames() Dim i As Integer For i = 1 To Sheets.Count If Left(Sheets(i).Name, 5) = "Sheet" Then Sheets(i).Name = Mid(Sheets(i).Name, 6 _ , Len(Sheets(i).Name) - 5) End If Nex...

Import/copy calendar in Outlook 2003
I got a new computer and installed Office 2003, and wanted to move my calendar to the new PC. I created a new data file called Personal Folders from Old PC. I wanted to copy my calendar OVER my current one in Personal Folders, but don't see a way to do so. I can copy my old calendar into the Pesonal Folders, but can't delete the new, empty Calendar. So I have Calendar, and Calendar 1 under my Personal Folders. Any way to just import/copy my reminders/appointments into my new calendar? Thanks for any advice. Ck G'Day Cathy, 1. Use the Folder List 2. Click on the OLD Cal...

Secondary Copy
Hi, My customer using Great Plains modified report(Primary Copy). Now he wants new report something similar to the modified GP report with very few changes. I tried to copy the modified report and planned to use us a secondary copy. But the report has temp tables, so I am unable to make secondary copy. Can some one help me in how to make a new report something similar to the modified report, where to launch it. Whether it is possible throught VBA & Modifier? Regards Selvakumar.S A report with a temporary table can only be a primary copy. This is because only a primary copy can b...

local copy of mail
How do you store a copy of all your mail on you local computer when using Exchange? You setup an OST/Offline Folders file. Check with your mail admin if they support that configuration. "Brandon Baker" <brandon@discussions.microsoft.com> wrote in message news:epNKuJ19FHA.4004@TK2MSFTNGP14.phx.gbl... > How do you store a copy of all your mail on you local computer when using > Exchange? > ...

Looking for a tool to repair corrupt excel sheet files
I am looking for a tool to repair corrupt excel sheet files. Any body knows? See also post http://groups.google.com/group/microsoft.public.excel/browse_thread/thread/dc040b0756273b62/9a108194fe01016e?lnk=st&q=aa+arens&rnum=1#9a108194fe01016e Bart Excel 2003 Hi Bart, Don't know how you corrupted your file, but from the description it seems you data is fine until you reenter data (F2+Enter would cause a reentry). If the sheet is really corrupt it would be more a matter of retrieving what data you can. From your description it sounds like someone selected all the cells on the ...

Copy info from one workbook to another?
I have a problem I have a workbook with the function i want like a discribe here. The problem is i want to split the workbook but i don`t know how. Is it possible to have a main workbook with information from other workbooks at each worksheet? I have 20 workbooks with information. I would like to have a main workbook with on sheet1 every row from the 20workbooks with category1, on sheet2 every row from the 20workbooks with category2, etc, etc. The information in the 20workbooks in always only on sheet. The Colum in which the data is has no fix end. I go to fill in the rows trough a...

Outlook 2000 SP3
How can I copy my mail and calendar to CD so that I can take my received and sent mail history to a new computer with Outlook installed? Thanks. >-----Original Message----- >How can I copy my mail and calendar to CD so that I can >take my received and sent mail history to a new computer >with Outlook installed? Thanks. >. > All your data saves in C:\Documents and Settings\Username\Local Settings\Application Data\Microsoft\Outlook\archive.pst and C:\Documents and Settings\Evgeni\Local Settings\Application Data\Microsoft\Outlook\outlook.pst You can either install instan...

Copy picture ossice wizard
I have project 2007 standard edition, but the button is not working at all? Any suggestions Hi, The wizard is IMHO useless. Go to Roport, Copy Picture and do without the Wizard what millions have done before the Wizard existed. HTH -- Jan De Messemaeker Microsoft Project Most Valuable Professional +32 495 300 620 For availability check: http://users.online.be/prom-ade/Calendar.pdf "Enrique" <Enrique@discussions.microsoft.com> wrote in message news:72B5AA6C-67AE-468D-B6AE-FF16F52E57BD@microsoft.com... >I have project 2007 standard edition, but the bu...

Log data in a shared workbook
Hi all Is it possible to have a spreadsheet which logs data from anothe without over writing each other's data, even though several colleague are inputting and saving in this shared sheet at different times. Eg. Sheet 1 has various data Sheet 2 - A1,2,3, etc = first save Sheet 3 - B1,2,3, etc = second save Etc. ...for the day Cheers Joe -- Message posted from http://www.ExcelForum.com Joey Would you consider writing to a CSV file? You could use VBA's text file functions to write directly to the file, but the file would still open in Excel. One advantage would be that...

Copy and paste versus copy and insert copied cells
What is the difference between these commands? Try them, it is pretty easy to see the difference -- Regards, Peo Sjoblom "Alana" <Alana@discussions.microsoft.com> wrote in message news:879FED29-5541-41B0-BB2C-7108D42ED593@microsoft.com... > What is the difference between these commands? ...

create pivot table from multiple sheet (excell 2003)
as understood, excell 2003 have row limit...but, currently i have data that more than the row limit... so, i split my data to 2 separate worksheet...the column name for each worksheet same.. my question, how can i create one pivot table from the two worksheet...i've tried using the wizard n consolidated data but failed.... thank you vm.. Maybe you could try creating the pivot directly from the Access source table (which doesn't have the 65k row limitations) In Excel, in a new sheet, Click Data > Import External data > Import data Navigate to where the Access file is >...

How do I change the text in a workbook from upper to lower case
Hi Please can anyone help with this one! I have a large workbook that I have created (just with text - no formulas) and I have done it in caps but now want to change all the text to lower case without having to re-type it all. Excel hslp is confusing so can anyone tell me how to do it please Thanks Mike Hi see: http://www.cpearson.com/excel/case.htm -- Regards Frank Kabel Frankfurt, Germany mike wrote: > Hi > > Please can anyone help with this one! > > I have a large workbook that I have created (just with text - no > formulas) and I have done it in caps but now...

subtotal copy and paste
Hi I have used the subtotal option in Excel and this is fine. I have also collasped the list so only the subtotal for each category is visible. However I want to copy and paste this list (just the subtotal) into another sheet When I do this it expands and shows all the results. Is it possible to just copy the visible bit. I have looked in paste special but no luck Cheers Hager On Jan 21, 6:38=A0am, Hager <Ha...@discussions.microsoft.com> wrote: > Hi > > I have used the subtotal option in Excel and this is fine. I have also > collasped the list so only the...

Copy above fails one way, copy below fails another way
I have a table of blood pressure readings that looks something like this: A B C D E 11 12 Averages: 134 83 74 13 R# Date Sys Dia Pul 14 4 8/17/08 138 87 72 15 3 8/15/08 130 84 76 16 2 8/12/08 137 83 70 17 1 8/11/08 129 79 76 Cell A14 contains =A15+1 Cell C12 contains =AVERAGE(C14:C17) Cell D12 contains =AVERAGE(D14:D17) Cell E12 contains =AVERAGE(E14:E17) Every time I take a new reading, I want to add a row to the top of the table, between row 13 (the header) and row 14 (the previous top row). I want to push a...

Duplicate Record exist Error
We are in the process of moving some customizations to the production environment. We are now getting the below error when attempting to save an opportunity. "Duplicate Error: A record with these values already exist. A dupolicate record cannot be created. Select one or more unique values and try again." Any suggestions is greatly apprciated! Seemed to be an issue with some jscript. "MDV1457" wrote: > We are in the process of moving some customizations to the production > environment. We are now getting the below error when attempting to save an > opp...

Business Portal "Copy to Excel" not working in Query pages
Hi, I am using Business Portal 4.0. When browsing through one of the queries pages in Business Portal, i clicked "Copy to Excel" icon. I got an error saying "The Office Web Components (OWC) must be installed to copy results to Excel." at the bottom. I am using Office 2007 on my machine. I came to know that Microsoft Office Web Components will no longer be shipping in Microsoft Office. I tried installing Office 2003 Add-in: Office Web Components from http://www.microsoft.com/downloads/details.aspx?familyid=7287252C-402E-4F72-97A5-E0FD290D4B76&displaylang=en a...

Copying graphs
Hi Is it possible to range value a graph ie I would like to copy the graph to another workbook, show all the information but without the links? Thanks You could copy the chart as a picture, then paste it wherever you want. Select the chart, hold Shift while clicking on the Edit menu, Choose Copy Picture, and select the On Screen and As Picture options, then go to the other workbook/sheet and Paste. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions Peltier Technical Services, Inc. - http://PeltierTech.com _______ "Dixie" <Dixie@discussions.micr...

Having a go with assembly... how do I copy a double into a register??
I'm trying to speed up a maths routine which consists of much iterative multiplication (and adding and subtraction of ) doubles. Now if I declare my doubles as floats float f double d _asm { mov edx, f //ok mov edx, d //error operand size conflict Can someone show me the error of my ways??? Thanks "Si" <me@you.twang> wrote in message news:sm1gk0l60ng23gilu9b68hkcqi3ub9horn@4ax.com... > > > I'm trying to speed up a maths routine which consists of much > iterative multiplication (and adding and subtraction of ) doubles. > > Now if I de...

protecting shared workbook
Hi , I need to protect a shared workbook - other users within the office need to be able to neter data however do not seem to be able to do this withough reformatting column widths etc (we have some weird and wonderful people here) I have tried tried what i though would work - tools - Protect Sheet - then deselecting format cells, format columns, format rows however this also prevent users from enetering data. Any help appreciated. Try unlocking just the cells that are used for data entry: Select just the cells that you use for data entry. 'Format' menu --> Cells --> Pro...

Howto associate existing transaction with overdue/upcoming payment?
When accepting downloaded transactions Money does not always recognize scheduled bill payments, or I accidentally hit no when Money asks if this is my scheduled payment. How do I associate an overdue/upcoming bill payment with an entry that was already downloaded/entered? The help talks about finding transactions to see if they were paid, which I can do, but still no option to associate a payment with the actual due bill. Any ideas? Pieter I don't know what you mean by "associate." Once you tell Money it's not the scheduled bill, you have entered the transaction. You...

Copying Views
Is there any way to copy the views under leads so that i can modify them and create different ones. I need to create 15 views and i do not want to do all of them one at a time. Even if there is a way to do it in sql i would love to know -- IT Manager It can be done in SQL, though it's unsupported. What you want need to do is use INSERT ... SELECT to copy rows in the savedquerybase, and give a different savedqueryid For a supported route you can use the CRM web service and create new instances of savedquery. The following article describes how to do this for the userquery, and coul...

EXCEL FILE a copy/a copy/a copy ....filename
when i save my excel file i get a saved copy of the file, not the file itself so my file name of a file i save 7 times can have 7 'a copy' in it eg c./my doc/a copy/a copy/ a copy..............a copy/xx.xls Is the file saved as Read Only? Do you get a message on opening asking you if it's read only? Regards, Alan. "ve" <ve@discussions.microsoft.com> wrote in message news:88C3DEBA-2C2E-4DF0-978B-F823E120458A@microsoft.com... > when i save my excel file i get a saved copy of the file, not the file > itself so my file name of a file i save ...

How do I move the data in one cell on a page to another page/cell
What command do I use to move the containts of one cell on a page to a different page and cell??? On the receiving page and cell, type = then navigate to the sheet and cell where you wish to extract the data and press Enter. Assuming you were in cell B1 of Sheet2,and you wanted it to copy the value from Sheet1 cell A10, then Excel would insert the formula =Sheet1!A10 You can just type the formula yourself, but it is probably easier to let Excel do it for you first time. Note, if your sheet name contains spaces, then the formula need single quotes around the sheet name. ='My new s...