can it be copied instead of referenced

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello --

i'm working on a spreadsheet form (doc 1) that looks at another spreadsheet
(doc 2 for 07/11/05, doc 2 for 07/12/05, doc 2 for 07/13/05 etc)) to grab
values on specific cells and displays them in the spreadsheet form (doc1).
However, doc 1 is dependant on doc 2 so if i close it the values are no
longer displayed. Since doc 2 will change on a daily basis, is there any way
or function i can use that will reference the cells i need but permanently
copy these values so doc 1 is not dependent on doc 2 but once the values are
referenced for that day it is available permanently. Thank you so much.
 
You would have to use macro VBA code similar to this:

Sub Macro1()
Windows("doc2_filename").Activate
Sheets("sheet1").Range("A1:F136").Copy
Windows("doc1_filename").Activate
Sheets("sheet1").Range("a1").PasteSpecial Paste:=xlPasteValues
Sheets("sheet1").Range("a1").PasteSpecial Paste:=xlPasteFormats
Range("A1").Select
End Sub
 
Simplify to

range("A1:F136").Value =
Workbooks("doc2.xls").Sheets(1).range("A1:F136").Value
 

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