get files and consolidate ranges

Brandonien

New Member
Joined
May 30, 2011
Messages
7
Hi I've concluded VBA is probably my best bet for efficiency here and really only need it this once. If you guys could help me I would greatly appreciate it! So I want to make an excel file (*ConDatalog.xlsx*) which will hold the consolidated tables on a single sheet.

This is the location of the unconsolidated datalogs which are in .csv format
C:\Users\Gnomish Fire\Desktop\RX-8 Tuning\Datalogs\Tune 1

This is the location of the consolidated excel file (*ConDatalog.xlsx*)
C:\Users\Gnomish Fire\Desktop\RX-8 Tuning\Datalogs

This is the range I need copied from EVERY excel file in the Tune 1 folder:
Sheet1!A2:Sheet1!U <---whenever thecells have no values so it could be 2 rows or 30000...

This is the range to copy them to
Sheet1!A1:Sheet1!U <---same as above

I need the data to be consecutive so that each table gets added to the bottom of the last

I also need it to clear all the data when the file is closed

Thank you for your time!
 
scratch the saving one unless you really feel like it, I just changed the default save path in excel instead as a work around (*however I see this coming back to bite me in the a$$ later*)
 
Upvote 0

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
'Folder where you want to save the Excel file
DefPath = Application.DefaultFilePath
If Right(DefPath, 1) <> "\" Then
DefPath = DefPath & "\"
End If

where do I enter a custom savepath in here insted of the default
 
Upvote 0

Forum statistics

Threads
1,224,518
Messages
6,179,261
Members
452,901
Latest member
LisaGo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top