Is there any function for importing data from other workbooks?

N

Notor

Hi

Is there any function with which I can import a specific
range of cells from another excel workbook into the one
I'm using? Any help greatly appreciated.

Peter Baranya
 
R

Ron de Bruin

Try something like this Notor

Sub test()
Dim Wb1 As Workbook
Dim Wb2 As Workbook
Application.ScreenUpdating = False
Set Wb1 = ActiveWorkbook
Set Wb2 = Workbooks.Open("C:\test.xls")
Wb2.Sheets("Sheet1").Range("a2:h600").copy _
Wb1.Sheets("sheet1").Range("a1")
Wb2.Close False
Application.ScreenUpdating = True
End Sub
 
T

telefono

Can you be more specific about how one goes about applkying this? Is it a
spreadshet function?

I would like to import some exteral data as well as a possible aternative to
my time problems mm:ss or m:ss that I cant seem to do much with in excel.

I certainly dont understand where you are speaking of applying such a thing.

Mark
 
J

JMay

To clarify, in part.... Notor asked for a function <<for which there isn't
one, that I know of>> so Ron responded (without saying so) and furnished
VBA code. Ron's code goes inside a standard module off of an empty Workbook
entitled "Wb1.xls".

Create a second Workbook "Wb2.xls" and enter test data in cells a2:h600 and
Save the Workbook.

Switch back to "Wb1.xls" and run Macro Test.
The data from Wb2.xls should now be in Wb1.xls cells A1:h599.
HTH
 

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

Top