Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Multiple Workbooks to a Single Sheet

How can I compile data from 50 different workbooks (single worksheet
each) on a single worksheet (vertically)? Each file is in the same
format and the files are on a cd rom. Thanks.

Ken
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Multiple Workbooks to a Single Sheet

Hi Ken

Try this example
http://www.rondebruin.nl/copy3.htm

Post back if you need help

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Ken" wrote in message om...
How can I compile data from 50 different workbooks (single worksheet
each) on a single worksheet (vertically)? Each file is in the same
format and the files are on a cd rom. Thanks.

Ken



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Multiple Workbooks to a Single Sheet

I do need help, Ron, as a beginner with VBA. I copied the code for
"Copy a column or columns from each workbook" from
http://www.rondebruin.nl/copy3.htm into a VBA module for Excel, then
pressed f5. I saw the file names (which are in c:\data) roll by on
the left, but I couldn't find a result on an Excel page. Also, I'm
trying to copy columns A-M from each workbook and I'm not clear how to
change the code from your page (copied below). Sorry for beginner's
questions.

sourceRange.Copy destrange
' Instead of this line you can use the code below to copy only
the values

'With sourceRange
' Set destrange = basebook.Worksheets(1).Columns(Colnum). _
' Resize(, .Columns.Count)

Ken



"Ron de Bruin" wrote in message ...
Hi Ken

Try this example
http://www.rondebruin.nl/copy3.htm

Post back if you need help

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Ken" wrote in message om...
How can I compile data from 50 different workbooks (single worksheet
each) on a single worksheet (vertically)? Each file is in the same
format and the files are on a cd rom. Thanks.

Ken

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Multiple Workbooks to a Single Sheet

Hi Ken

Set sourceRange = mybook.Worksheets(1).Columns("A:A")

change to

Set sourceRange = mybook.Worksheets(1).Columns("A:M")

It will copy the the columns from the first Worksheet of each workbook in the
first worksheet in the workbook where you copy the macro.

You can also use a sheet name in the code if you want
In the example I use the sheet index (worksheets(1) is the first worksheet in the Tab order)


Don't forget there are only 256 columns

256/13 columns = ? files


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Ken" wrote in message om...
I do need help, Ron, as a beginner with VBA. I copied the code for
"Copy a column or columns from each workbook" from
http://www.rondebruin.nl/copy3.htm into a VBA module for Excel, then
pressed f5. I saw the file names (which are in c:\data) roll by on
the left, but I couldn't find a result on an Excel page. Also, I'm
trying to copy columns A-M from each workbook and I'm not clear how to
change the code from your page (copied below). Sorry for beginner's
questions.

sourceRange.Copy destrange
' Instead of this line you can use the code below to copy only
the values

'With sourceRange
' Set destrange = basebook.Worksheets(1).Columns(Colnum). _
' Resize(, .Columns.Count)

Ken



"Ron de Bruin" wrote in message ...
Hi Ken

Try this example
http://www.rondebruin.nl/copy3.htm

Post back if you need help

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Ken" wrote in message om...
How can I compile data from 50 different workbooks (single worksheet
each) on a single worksheet (vertically)? Each file is in the same
format and the files are on a cd rom. Thanks.

Ken



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Multiple Workbooks to a Single Sheet

Ron -

I had tried changing A:A to A:M, but this time it worked (using 4 of
my 50 files). However, I want each original sheet to be placed below
the preceding sheet rather than to its right. I tried changing

Set destrange = basebook.Worksheets(1).Columns(Colnum)

to

Set destrange = basebook.Worksheets(1).rows(rownum)

but that didn't work (error message). How did I get vertical
compilation. Thanks.

Ken



****
"Ron de Bruin" wrote in message ...
Hi Ken

Set sourceRange = mybook.Worksheets(1).Columns("A:A")

change to

Set sourceRange = mybook.Worksheets(1).Columns("A:M")

It will copy the the columns from the first Worksheet of each workbook in the
first worksheet in the workbook where you copy the macro.

You can also use a sheet name in the code if you want
In the example I use the sheet index (worksheets(1) is the first worksheet in the Tab order)


Don't forget there are only 256 columns

256/13 columns = ? files


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Ken" wrote in message om...
I do need help, Ron, as a beginner with VBA. I copied the code for
"Copy a column or columns from each workbook" from
http://www.rondebruin.nl/copy3.htm into a VBA module for Excel, then
pressed f5. I saw the file names (which are in c:\data) roll by on
the left, but I couldn't find a result on an Excel page. Also, I'm
trying to copy columns A-M from each workbook and I'm not clear how to
change the code from your page (copied below). Sorry for beginner's
questions.

sourceRange.Copy destrange
' Instead of this line you can use the code below to copy only
the values

'With sourceRange
' Set destrange = basebook.Worksheets(1).Columns(Colnum). _
' Resize(, .Columns.Count)

Ken



"Ron de Bruin" wrote in message ...
Hi Ken

Try this example
http://www.rondebruin.nl/copy3.htm

Post back if you need help

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Ken" wrote in message om...
How can I compile data from 50 different workbooks (single worksheet
each) on a single worksheet (vertically)? Each file is in the same
format and the files are on a cd rom. Thanks.

Ken



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Multiple Workbooks to a Single Sheet

Hi Ken

Use the range example then
http://www.rondebruin.nl/copy3.htm#Range

I am working on a update today of the page
Check it out this week

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Ken" wrote in message om...
Ron -

I had tried changing A:A to A:M, but this time it worked (using 4 of
my 50 files). However, I want each original sheet to be placed below
the preceding sheet rather than to its right. I tried changing

Set destrange = basebook.Worksheets(1).Columns(Colnum)

to

Set destrange = basebook.Worksheets(1).rows(rownum)

but that didn't work (error message). How did I get vertical
compilation. Thanks.

Ken



****
"Ron de Bruin" wrote in message ...
Hi Ken

Set sourceRange = mybook.Worksheets(1).Columns("A:A")

change to

Set sourceRange = mybook.Worksheets(1).Columns("A:M")

It will copy the the columns from the first Worksheet of each workbook in the
first worksheet in the workbook where you copy the macro.

You can also use a sheet name in the code if you want
In the example I use the sheet index (worksheets(1) is the first worksheet in the Tab order)


Don't forget there are only 256 columns

256/13 columns = ? files


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Ken" wrote in message om...
I do need help, Ron, as a beginner with VBA. I copied the code for
"Copy a column or columns from each workbook" from
http://www.rondebruin.nl/copy3.htm into a VBA module for Excel, then
pressed f5. I saw the file names (which are in c:\data) roll by on
the left, but I couldn't find a result on an Excel page. Also, I'm
trying to copy columns A-M from each workbook and I'm not clear how to
change the code from your page (copied below). Sorry for beginner's
questions.

sourceRange.Copy destrange
' Instead of this line you can use the code below to copy only
the values

'With sourceRange
' Set destrange = basebook.Worksheets(1).Columns(Colnum). _
' Resize(, .Columns.Count)

Ken



"Ron de Bruin" wrote in message ...
Hi Ken

Try this example
http://www.rondebruin.nl/copy3.htm

Post back if you need help

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Ken" wrote in message om...
How can I compile data from 50 different workbooks (single worksheet
each) on a single worksheet (vertically)? Each file is in the same
format and the files are on a cd rom. Thanks.

Ken



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Multiple Workbooks to a Single Sheet

Hi Ken

I have done a update
http://www.rondebruin.nl/copy3.htm

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Ron de Bruin" wrote in message ...
Hi Ken

Use the range example then
http://www.rondebruin.nl/copy3.htm#Range

I am working on a update today of the page
Check it out this week

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Ken" wrote in message om...
Ron -

I had tried changing A:A to A:M, but this time it worked (using 4 of
my 50 files). However, I want each original sheet to be placed below
the preceding sheet rather than to its right. I tried changing

Set destrange = basebook.Worksheets(1).Columns(Colnum)

to

Set destrange = basebook.Worksheets(1).rows(rownum)

but that didn't work (error message). How did I get vertical
compilation. Thanks.

Ken



****
"Ron de Bruin" wrote in message ...
Hi Ken

Set sourceRange = mybook.Worksheets(1).Columns("A:A")

change to

Set sourceRange = mybook.Worksheets(1).Columns("A:M")

It will copy the the columns from the first Worksheet of each workbook in the
first worksheet in the workbook where you copy the macro.

You can also use a sheet name in the code if you want
In the example I use the sheet index (worksheets(1) is the first worksheet in the Tab order)


Don't forget there are only 256 columns

256/13 columns = ? files


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Ken" wrote in message om...
I do need help, Ron, as a beginner with VBA. I copied the code for
"Copy a column or columns from each workbook" from
http://www.rondebruin.nl/copy3.htm into a VBA module for Excel, then
pressed f5. I saw the file names (which are in c:\data) roll by on
the left, but I couldn't find a result on an Excel page. Also, I'm
trying to copy columns A-M from each workbook and I'm not clear how to
change the code from your page (copied below). Sorry for beginner's
questions.

sourceRange.Copy destrange
' Instead of this line you can use the code below to copy only
the values

'With sourceRange
' Set destrange = basebook.Worksheets(1).Columns(Colnum). _
' Resize(, .Columns.Count)

Ken



"Ron de Bruin" wrote in message ...
Hi Ken

Try this example
http://www.rondebruin.nl/copy3.htm

Post back if you need help

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2000-2003)
www.rondebruin.nl



"Ken" wrote in message om...
How can I compile data from 50 different workbooks (single worksheet
each) on a single worksheet (vertically)? Each file is in the same
format and the files are on a cd rom. Thanks.

Ken





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
Merging multiple workbooks with crosslinked formulas into single f JW73 Excel Discussion (Misc queries) 0 February 5th 08 12:58 AM
Creating a single workbook from multiple workbooks Scrum Down Excel Discussion (Misc queries) 3 September 6th 06 09:01 AM
Consolidate multiple workbooks into a single worksheet Krista Excel Worksheet Functions 1 May 15th 06 05:10 PM
Excel 2003 Referencing multiple workbooks via single variable BBohannon Excel Worksheet Functions 0 April 20th 05 08:32 PM
How to Link named ranges from multiple Workbooks into a single Wo. PMAP_HELP Excel Discussion (Misc queries) 1 December 14th 04 05:51 PM


All times are GMT +1. The time now is 05:32 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"