VBA code to Loop through a folder and subfolders and stack together all the data in a sheet called "SeedPrep"

jskasango

Board Regular
Joined
Jul 18, 2012
Messages
202
Office Version
  1. 365
Platform
  1. Windows
VBA code to Loop through a folder and subfolders and stack together all the data in a sheet called "SeedPrep" starting from row 25 and reserving the headers from row 1 of the first found sheet.
The code should skip any file that is not a *.xl*. TIA.
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
There is a good code example in this thread.

 
Upvote 0
I have looked at the thread. It does not help much because it is about listing and not stacking the sheets found. Also, I wish to have the code let me browse to the desired parent folder instead of me having to indicate parent folder in the code. Thanks all the same.
 
Upvote 0
What I need is Using Excel 2016, please write me a VBA code that will let me select a parent folder, loop through the parent folder and sub folders, look for all workbooks *.XL* entire row copy and stack all sheets named "Seedprep" with data starting from row 25. Pick column headers from row 1 of the first sheet. Name the new workbook "ParentFolder_Consolidated".
 
Upvote 0

Forum statistics

Threads
1,216,100
Messages
6,128,830
Members
449,471
Latest member
lachbee

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