PC Review


Reply
Thread Tools Rate Thread

adding 1000 excel files

 
 
A.A.A
Guest
Posts: n/a
 
      11th Jul 2008
Hi all,

Is there an excel macro thta can merge 1000 excel files? I have 1000
excel files named measure1,measure2,.....,measure1000. Each file
contains one number in the cell "A2". I want to merge these files in
one excel file so that this excel file has just one column and 1000
rows displaying the 1000 numbers. Is this possible with
excel??????????????????/

Aya
 
Reply With Quote
 
 
 
 
Harald Staff
Guest
Posts: n/a
 
      11th Jul 2008
Hi Aya

A macro like this should do the trick, assuming all the files are stored in
C:\Temp and suffixed xls:

Sub MergeFolderFiles()
Dim wb As Workbook
Dim TheFile As String
Dim MyPath As String
Dim R As Long
MyPath = "C:\Temp"
ChDir MyPath
TheFile = Dir("*.xls")
Do While TheFile <> ""
Set wb = Workbooks.Open(MyPath & "\" & TheFile)
DoEvents
R = R + 1
ThisWorkbook.Sheets(1).Cells(R, 1).Value = _
wb.Sheets(1).Range("A2").Value
wb.Close
TheFile = Dir
Loop
End Sub

HTH. Best wishes Harald

"A.A.A" <(E-Mail Removed)> skrev i melding
news:6ca41585-3d01-49d2-817b-(E-Mail Removed)...
> Hi all,
>
> Is there an excel macro thta can merge 1000 excel files? I have 1000
> excel files named measure1,measure2,.....,measure1000. Each file
> contains one number in the cell "A2". I want to merge these files in
> one excel file so that this excel file has just one column and 1000
> rows displaying the 1000 numbers. Is this possible with
> excel??????????????????/
>
> Aya



 
Reply With Quote
 
Lori
Guest
Posts: n/a
 
      11th Jul 2008
Try Data > Consolidate with the options...

Function: Count
Reference: *.xls!A2
Create Links: Check

Browse for the folder containing the files then just click cancel to make
sure that it's the current folder.

Click OK to run, when it's finished unhide the rows.


"A.A.A" wrote:

> Hi all,
>
> Is there an excel macro thta can merge 1000 excel files? I have 1000
> excel files named measure1,measure2,.....,measure1000. Each file
> contains one number in the cell "A2". I want to merge these files in
> one excel file so that this excel file has just one column and 1000
> rows displaying the 1000 numbers. Is this possible with
> excel??????????????????/
>
> Aya
>

 
Reply With Quote
 
Ron de Bruin
Guest
Posts: n/a
 
      11th Jul 2008
For the OP

You can also use this add-in
http://www.rondebruin.nl/merge.htm

See also the code links on the bottom of the page


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Harald Staff" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> Hi Aya
>
> A macro like this should do the trick, assuming all the files are stored in
> C:\Temp and suffixed xls:
>
> Sub MergeFolderFiles()
> Dim wb As Workbook
> Dim TheFile As String
> Dim MyPath As String
> Dim R As Long
> MyPath = "C:\Temp"
> ChDir MyPath
> TheFile = Dir("*.xls")
> Do While TheFile <> ""
> Set wb = Workbooks.Open(MyPath & "\" & TheFile)
> DoEvents
> R = R + 1
> ThisWorkbook.Sheets(1).Cells(R, 1).Value = _
> wb.Sheets(1).Range("A2").Value
> wb.Close
> TheFile = Dir
> Loop
> End Sub
>
> HTH. Best wishes Harald
>
> "A.A.A" <(E-Mail Removed)> skrev i melding
> news:6ca41585-3d01-49d2-817b-(E-Mail Removed)...
>> Hi all,
>>
>> Is there an excel macro thta can merge 1000 excel files? I have 1000
>> excel files named measure1,measure2,.....,measure1000. Each file
>> contains one number in the cell "A2". I want to merge these files in
>> one excel file so that this excel file has just one column and 1000
>> rows displaying the 1000 numbers. Is this possible with
>> excel??????????????????/
>>
>> Aya

>
>

 
Reply With Quote
 
HMKlinkenberg@googlemail.com
Guest
Posts: n/a
 
      16th Jul 2008
Hi Ron

I just want to say that your add-in is brilliant - I have been
searching for ages for such a utility as I have spent hours and hours
extracting data from individual Excel questionnaires, now your add-in
can do it in seconds. Your web site, now discovered, is in my Excel
favourites.

Many thanks

Humphrey


On Jul 11, 6:03*pm, "Ron de Bruin" <rondebr...@kabelfoon.nl> wrote:
> For the OP
>
> You can also use this add-inhttp://www.rondebruin.nl/merge.htm
>
> See also the code links on the bottom of the page
>
> --
>
> Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm
>
> "Harald Staff" <s...@enron.invalid> wrote in messagenews:(E-Mail Removed)...

 
Reply With Quote
 
Ron de Bruin
Guest
Posts: n/a
 
      16th Jul 2008
Hi Humphrey

Thanks for the feedback


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


<(E-Mail Removed)> wrote in message news:d40f21b6-6fc1-427a-aa4c-(E-Mail Removed)...
Hi Ron

I just want to say that your add-in is brilliant - I have been
searching for ages for such a utility as I have spent hours and hours
extracting data from individual Excel questionnaires, now your add-in
can do it in seconds. Your web site, now discovered, is in my Excel
favourites.

Many thanks

Humphrey


On Jul 11, 6:03 pm, "Ron de Bruin" <rondebr...@kabelfoon.nl> wrote:
> For the OP
>
> You can also use this add-inhttp://www.rondebruin.nl/merge.htm
>
> See also the code links on the bottom of the page
>
> --
>
> Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm
>
> "Harald Staff" <s...@enron.invalid> wrote in messagenews:(E-Mail Removed)...

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
adding time (H:M)in two cells, I get (#VALUE!) if the total>1000 Isam Microsoft Excel Crashes 2 20th Oct 2009 10:41 AM
Excel adding unwanted tabs to text delimited files =?Utf-8?B?Rmlubg==?= Microsoft Excel Misc 1 13th Jul 2007 05:28 AM
Adding Domain Group to 1000 Workstations =?Utf-8?B?UmFqbmlzaA==?= Microsoft Windows 2000 Active Directory 1 26th Apr 2006 04:01 PM
Adding several Excel files into one Kenny Dee Microsoft Excel New Users 2 19th Jul 2005 03:12 PM
programmaticaly test more then 1000 excel files for "opening Errors" Robert Microsoft Excel Programming 2 23rd Dec 2004 10:49 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:11 AM.