Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() Hope someone can help ![]() What I want to do is have a macro that copies the same cells from 10 different specifically named excel files and pastes them onto the relevant worksheet within another workbook. All the files will be within 1 folder. Hope this makes sence and someone can help. Thanks -- kingdt ------------------------------------------------------------------------ kingdt's Profile: http://www.excelforum.com/member.php...o&userid=32531 View this thread: http://www.excelforum.com/showthread...hreadid=523143 |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
here is some pseudo code
Dim sname as String Dim bk as Workbook Dim rng as Range sname = dir("C:\Myfolder\Myfile*.xls") do while sName < "" set bk = workbooks.open("C:\MyFolder\" & sName) set rng = bk.worksheets(1).Range("A1:A10") rng.copy thisworkbook.worksheets( _ left(sName,len(sname)-4)).Range("A1") bk.close Savechanges:=False sName = dir() Loop Obviously I don't know how "particular" or "relevant" should be specifically implemented in the code. -- Regards, Tom Ogilvy "kingdt" wrote: Hope someone can help ![]() What I want to do is have a macro that copies the same cells from 10 different specifically named excel files and pastes them onto the relevant worksheet within another workbook. All the files will be within 1 folder. Hope this makes sence and someone can help. Thanks -- kingdt ------------------------------------------------------------------------ kingdt's Profile: http://www.excelforum.com/member.php...o&userid=32531 View this thread: http://www.excelforum.com/showthread...hreadid=523143 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how Excel can copy the data in a row of worksheet to other? | Excel Worksheet Functions | |||
Macro to open workbook and copy and paste values in to orig workbo | Excel Worksheet Functions | |||
Excel Macro to Copy & Paste | Excel Worksheet Functions | |||
automaticly copy data from one worksheet to another | Excel Discussion (Misc queries) | |||
Open workbook to specific worksheet | Excel Discussion (Misc queries) |