I'm fairly new to VBA and macro's, so I'm writing a post here to hopefully get some help and tips for my solution. My problem is as follows:
I need to copy an uncertain amount of cells containing data from excel-files in folders and subfolders to paste in an excel-"mother"-file:
"All files that contain data is in one folder and it's subfolders. the cells to be copied in theese files ALWAYS start at row 40, and are in cells A, B, C and D. How many rows that need to be copied however is uncertain."
What I'm looking for is code that loops through a folder and it's subfolders looking for files to get data from. I'm also thinking that inside this loop I will later write code to collect data from each individual file.
SO, what I'm looking for is:
- Code to loop through a folder and subfolders to collect data from file.
- Code that finds last row with data and copies all data from start to this last row. I'm thinking something like: "A40:D & UncertainRange"
All help is greatly appreciated.. afterall I'm still a VBA Noob.
Have a great weekend, and may all of your problems be solved by scripting.
Good day.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…