Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Importing into Excel

Here's my situation. I have several Excel files that are downloaded from a
website daily. These files have any where from 1 to 6 tabs in each file and
NEVER exceed 5,000 records per tab. Meaning the most records downloaded
would never exceed 30,000. Each day it's different though, one day it could
be 3 tabs the next day it might only be 1.
How would I be able to import these automatically into another Excel file
and have the code look at all the tabs that are within the downloaded file?
The range would always be columns A - AK and as stated, would never go beyond
5,000 rows per tab. It's just the number of tabs that's changing.

ANY help would be so greatly appreciated!!! Thanking you in advance for
your valuable time!!
JCarter
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Importing into Excel

Workbooks("Summary") _
worksheets(1).Cells(rows.count,1).End(xlup)(2)

should be

Workbooks("Summary.xls") _
.worksheets(1).Cells(rows.count,1).End(xlup)(2)

add .xls and put a period before worksheets

--
Regards,
Tom Ogilvy
"Tom Ogilvy" wrote in message
...
for each sh in ActiveWorkbook.Worksheets
sh.cells(1,1).CurrentRegion.Copy _
Destination:=Workbooks("Summary") _
worksheets(1).Cells(rows.count,1).End(xlup)(2)
Next

--
Regards,
Tom Ogilvy

"Importing Worksheets into Excel" <Importing Worksheets into
wrote in message
...
Here's my situation. I have several Excel files that are downloaded

from
a
website daily. These files have any where from 1 to 6 tabs in each file

and
NEVER exceed 5,000 records per tab. Meaning the most records downloaded
would never exceed 30,000. Each day it's different though, one day it

could
be 3 tabs the next day it might only be 1.
How would I be able to import these automatically into another Excel

file
and have the code look at all the tabs that are within the downloaded

file?
The range would always be columns A - AK and as stated, would never go

beyond
5,000 rows per tab. It's just the number of tabs that's changing.

ANY help would be so greatly appreciated!!! Thanking you in advance for
your valuable time!!
JCarter





  #4   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Importing into Excel

Tom,
Thank you so much for your assistance. I'm really new to
this and I'm still having problems using your
instructions. Receiving a "Run-Time Erro 9 - Subscript
out of range"

Could you direct me again?

-----Original Message-----
Workbooks("Summary") _
worksheets(1).Cells(rows.count,1).End(xlup)(2)

should be

Workbooks("Summary.xls") _
.worksheets(1).Cells(rows.count,1).End(xlup)(2)

add .xls and put a period before worksheets

--
Regards,
Tom Ogilvy
"Tom Ogilvy" wrote in message
...
for each sh in ActiveWorkbook.Worksheets
sh.cells(1,1).CurrentRegion.Copy _
Destination:=Workbooks("Summary") _
worksheets(1).Cells(rows.count,1).End(xlup)(2)
Next

--
Regards,
Tom Ogilvy

"Importing Worksheets into Excel" <Importing

Worksheets into
wrote in message
news:93F07F1C-E04F-4472-A19A-

...
Here's my situation. I have several Excel files

that are downloaded
from
a
website daily. These files have any where from 1 to

6 tabs in each file
and
NEVER exceed 5,000 records per tab. Meaning the

most records downloaded
would never exceed 30,000. Each day it's different

though, one day it
could
be 3 tabs the next day it might only be 1.
How would I be able to import these automatically

into another Excel
file
and have the code look at all the tabs that are

within the downloaded
file?
The range would always be columns A - AK and as

stated, would never go
beyond
5,000 rows per tab. It's just the number of tabs

that's changing.

ANY help would be so greatly appreciated!!!

Thanking you in advance for
your valuable time!!
JCarter





.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Importing into Excel

if the error is on that line of code, then you don't have a workbook named
Summary.xls. I used that name as an example. You would need put the name
of the workbook you want to use as well as designate which sheet in that
workbook to use.

--
Regards,
Tom Ogilvy
"Tom Ogilvy" wrote in message
...
Workbooks("Summary") _
worksheets(1).Cells(rows.count,1).End(xlup)(2)

should be

Workbooks("Summary.xls") _
.worksheets(1).Cells(rows.count,1).End(xlup)(2)

add .xls and put a period before worksheets

--
Regards,
Tom Ogilvy
"Tom Ogilvy" wrote in message
...
for each sh in ActiveWorkbook.Worksheets
sh.cells(1,1).CurrentRegion.Copy _
Destination:=Workbooks("Summary") _
worksheets(1).Cells(rows.count,1).End(xlup)(2)
Next

--
Regards,
Tom Ogilvy

"Importing Worksheets into Excel" <Importing Worksheets into
wrote in message
...
Here's my situation. I have several Excel files that are downloaded

from
a
website daily. These files have any where from 1 to 6 tabs in each

file
and
NEVER exceed 5,000 records per tab. Meaning the most records

downloaded
would never exceed 30,000. Each day it's different though, one day it

could
be 3 tabs the next day it might only be 1.
How would I be able to import these automatically into another Excel

file
and have the code look at all the tabs that are within the downloaded

file?
The range would always be columns A - AK and as stated, would never go

beyond
5,000 rows per tab. It's just the number of tabs that's changing.

ANY help would be so greatly appreciated!!! Thanking you in advance

for
your valuable time!!
JCarter









  #6   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Importing into Excel

I realize now what my error was. I did have the proper
named files, it was that I didn't have "BOTH" files
opened at the time of running the code.

Thank you again so much for your patience and assistance!
JCarter
-----Original Message-----
if the error is on that line of code, then you don't

have a workbook named
Summary.xls. I used that name as an example. You would

need put the name
of the workbook you want to use as well as designate

which sheet in that
workbook to use.

--
Regards,
Tom Ogilvy
"Tom Ogilvy" wrote in message
...
Workbooks("Summary") _
worksheets(1).Cells(rows.count,1).End(xlup)(2)

should be

Workbooks("Summary.xls") _
.worksheets(1).Cells(rows.count,1).End(xlup)(2)

add .xls and put a period before worksheets

--
Regards,
Tom Ogilvy
"Tom Ogilvy" wrote in message
...
for each sh in ActiveWorkbook.Worksheets
sh.cells(1,1).CurrentRegion.Copy _
Destination:=Workbooks("Summary") _
worksheets(1).Cells(rows.count,1).End(xlup)(2)
Next

--
Regards,
Tom Ogilvy

"Importing Worksheets into Excel" <Importing

Worksheets into
wrote in message
news:93F07F1C-E04F-4472-A19A-

...
Here's my situation. I have several Excel files

that are downloaded
from
a
website daily. These files have any where from 1

to 6 tabs in each
file
and
NEVER exceed 5,000 records per tab. Meaning the

most records
downloaded
would never exceed 30,000. Each day it's

different though, one day it
could
be 3 tabs the next day it might only be 1.
How would I be able to import these automatically

into another Excel
file
and have the code look at all the tabs that are

within the downloaded
file?
The range would always be columns A - AK and as

stated, would never go
beyond
5,000 rows per tab. It's just the number of tabs

that's changing.

ANY help would be so greatly appreciated!!!

Thanking you in advance
for
your valuable time!!
JCarter






.

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
Importing Alan Beban's code on Arrays; Importing a module or a project Steve G Excel Worksheet Functions 4 August 27th 07 04:18 PM
Importing from Excel Amy Excel Discussion (Misc queries) 1 March 31st 06 03:09 PM
importing into excel jason2444 Excel Discussion (Misc queries) 1 March 29th 06 10:05 PM
importing files into excel Gabby Excel Discussion (Misc queries) 2 January 13th 05 09:41 PM
Excel importing of .csv and .xml Bernie Yaeger Excel Programming 2 July 28th 04 04:00 PM


All times are GMT +1. The time now is 01:10 PM.

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"