Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default Copy Data from another sheet

Hey everyone, I have a big excel sheet with lots of formulas, macros,
ect but the one problem I have is that right now I have to load two
pages of data into the workbook each time I want to update everything.
I have to download the data and then I end up with two books...
Sheet_1.xls and Sheet_2.xls the first book has one sheet and needs
to be copied into the master book (sheet "raw data") and the second
book has one sheet which needs to be copied into the master book
(sheet "raw data2).

I would like to have a macro that would let the user in a dialog box
select where the files are located, have them open and copy their
sheets into the master. Is this possible? if so please help.

Thanks.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 772
Default Copy Data from another sheet

mySheet = Application.GetOpenFilename( _
filefilter:="Excel Files (*.xls),*.xls", Title:="Choose Files",
MultiSelect:=False)

'Make sure a file was selected
If mySheet = "False" Then
MsgBox "No file selected, please select a file", vbCritical
Exit Sub
End If

Workbooks.Open mySheet
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"tnederlof" wrote:

Hey everyone, I have a big excel sheet with lots of formulas, macros,
ect but the one problem I have is that right now I have to load two
pages of data into the workbook each time I want to update everything.
I have to download the data and then I end up with two books...
Sheet_1.xls and Sheet_2.xls the first book has one sheet and needs
to be copied into the master book (sheet "raw data") and the second
book has one sheet which needs to be copied into the master book
(sheet "raw data2).

I would like to have a macro that would let the user in a dialog box
select where the files are located, have them open and copy their
sheets into the master. Is this possible? if so please help.

Thanks.


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 772
Default Copy Data from another sheet

Hit the button too soon. Just create a sub and put this in there, it will
open the selected file. Change or erase the file type section to suit what
file type you are getting.
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"John Bundy" wrote:

mySheet = Application.GetOpenFilename( _
filefilter:="Excel Files (*.xls),*.xls", Title:="Choose Files",
MultiSelect:=False)

'Make sure a file was selected
If mySheet = "False" Then
MsgBox "No file selected, please select a file", vbCritical
Exit Sub
End If

Workbooks.Open mySheet
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"tnederlof" wrote:

Hey everyone, I have a big excel sheet with lots of formulas, macros,
ect but the one problem I have is that right now I have to load two
pages of data into the workbook each time I want to update everything.
I have to download the data and then I end up with two books...
Sheet_1.xls and Sheet_2.xls the first book has one sheet and needs
to be copied into the master book (sheet "raw data") and the second
book has one sheet which needs to be copied into the master book
(sheet "raw data2).

I would like to have a macro that would let the user in a dialog box
select where the files are located, have them open and copy their
sheets into the master. Is this possible? if so please help.

Thanks.


  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default Copy Data from another sheet

On Aug 13, 10:18 am, John Bundy (remove) wrote:
Hit the button too soon. Just create a sub and put this in there, it will
open the selected file. Change or erase the file type section to suit what
file type you are getting.
--
-John
Please rate when your question is answered to help us and others know what
is helpful.

"John Bundy" wrote:
mySheet = Application.GetOpenFilename( _
filefilter:="Excel Files (*.xls),*.xls", Title:="Choose Files",
MultiSelect:=False)


'Make sure a file was selected
If mySheet = "False" Then
MsgBox "No file selected, please select a file", vbCritical
Exit Sub
End If


Workbooks.Open mySheet
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"tnederlof" wrote:


Hey everyone, I have a big excel sheet with lots of formulas, macros,
ect but the one problem I have is that right now I have to load two
pages of data into the workbook each time I want to update everything.
I have to download the data and then I end up with two books...
Sheet_1.xls and Sheet_2.xls the first book has one sheet and needs
to be copied into the master book (sheet "raw data") and the second
book has one sheet which needs to be copied into the master book
(sheet "raw data2).


I would like to have a macro that would let the user in a dialog box
select where the files are located, have them open and copy their
sheets into the master. Is this possible? if so please help.


Thanks.


thanks for your help, I get an error in the first part of the macro
everytime I run it, could you tell me where to put the code on
different lines please? Also once the sheet is opened how do I get it
to copy sheets off of this page.

Thanks again!

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
how to copy data from one sheet to another nastech Excel Discussion (Misc queries) 2 June 20th 07 06:31 PM
How can i copy data from a tabbed working sheet to a summary sheet StephenF Excel Discussion (Misc queries) 1 March 15th 07 03:40 PM
how to copy a cell with formula from sheet 1 (data is all vertical) into sheet 2 parag Excel Worksheet Functions 3 June 15th 06 10:29 PM
copy some data to next sheet Douglas groom New Users to Excel 2 January 31st 06 05:45 PM
Copy sheet 1 data to sheet 2 cells. Tom Doggett Excel Worksheet Functions 1 July 19th 05 11:49 PM


All times are GMT +1. The time now is 08:53 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"