Hello,
My uncle asked me to find a way to extract data from more than 250 excel files and dump them into a single excel file.
Is there a macro that will allow me to extract them quickly ?
Thank you
Hello,
My uncle asked me to find a way to extract data from more than 250 excel files and dump them into a single excel file.
Is there a macro that will allow me to extract them quickly ?
Thank you
It depends what you mean by extract. Does it mean take a single sheet out of each workbook and create a workbook of 250 sheets or does it mean taking a range of data from each workbook and putting it into a single sheet or something else.
A couple of sample workbooks with before and after would help getting you a solution.
Martin
Hello mrice
It means the latter.
I want to take the column from each 250 sheets and paste them into a single workbook.
any help please
Hello,
I recorded the macro and here what I got
Sub SalaryTracker()
'
' SalaryTracker Macro
'
'
Windows("Salary Estimator Model Final US GMI 2015 September Final.xlsm"). _
Activate
Range("C8:D8").Select
Selection.Copy
Windows("Book3").Activate
ActiveSheet.Paste
Range("C3").Select
Windows("Salary Estimator Model Final US GMI 2015 September Final.xlsm"). _
Activate
Range("H34").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Book3").Activate
ActiveSheet.Paste
Range("D3").Select
Windows("Salary Estimator Model Final US GMI 2015 September Final.xlsm"). _
Activate
Range("M34:N34").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Book3").Activate
ActiveSheet.Paste
Range("F3").Select
Windows("Salary Estimator Model Final US GMI 2015 September Final.xlsm"). _
Activate
Range("F34:G34").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Book3").Activate
ActiveSheet.Paste
Range("H3").Select
Windows("Salary Estimator Model Final US GMI 2015 September Final.xlsm"). _
Activate
Windows("Book3").Activate
Windows("Salary Estimator Model Final US GMI 2015 September Final.xlsm"). _
Activate
Range("P34").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Book3").Activate
ActiveSheet.Paste
Range("I3").Select
Windows("Salary Estimator Model Final US GMI 2015 September Final.xlsm"). _
Activate
Range("Q34:T34").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Book3").Activate
ActiveSheet.Paste
End Sub
How can I make it more efficient ? and replace "salary estimator..." with the current window open because they have different names.
Thanks
Hello,
My uncle asked me to find a way to extract data from more than 250 excel files and dump them into a single excel file.
I did a record from one single excel file and I got this:
Sub SalaryTracker()
'
' SalaryTracker Macro
'
'
Windows("Salary Estimator Model Final US GMI 2015 September Final.xlsm"). _
Activate
Range("C8:D8").Select
Selection.Copy
Windows("Book3").Activate
ActiveSheet.Paste
Range("C3").Select
Windows("Salary Estimator Model Final US GMI 2015 September Final.xlsm"). _
Activate
Range("H34").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Book3").Activate
ActiveSheet.Paste
Range("D3").Select
Windows("Salary Estimator Model Final US GMI 2015 September Final.xlsm"). _
Activate
Range("M34:N34").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Book3").Activate
ActiveSheet.Paste
Range("F3").Select
Windows("Salary Estimator Model Final US GMI 2015 September Final.xlsm"). _
Activate
Range("F34:G34").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Book3").Activate
ActiveSheet.Paste
Range("H3").Select
Windows("Salary Estimator Model Final US GMI 2015 September Final.xlsm"). _
Activate
Windows("Book3").Activate
Windows("Salary Estimator Model Final US GMI 2015 September Final.xlsm"). _
Activate
Range("P34").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Book3").Activate
ActiveSheet.Paste
Range("I3").Select
Windows("Salary Estimator Model Final US GMI 2015 September Final.xlsm"). _
Activate
Range("Q34:T34").Select
Application.CutCopyMode = False
Selection.Copy
Windows("Book3").Activate
ActiveSheet.Paste
End Sub
How can I make it more efficient ? and replace "salary estimator..." with the current window open because they have differnt names.
Thanks
Here's a free add-in that may do what you want.
RDBMerge, Excel Merge Add-in
Surround your VBA code with CODE tags e.g.;
[CODE]your VBA code here[/CODE]
The # button in the forum editor will apply CODE tags around your selected text.
Should I open all the 250 excel files at once so I can use this add in ?
any help please ?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks