Macro to loop through all worksheets, pulling a range of cells if criteria matched.
Hello all. I am a long time reader, but this is my first post. I have a project I've been working on for some time now, and I've hit a point where I'm stuck.
What I want to do is this -- I'm going to have a database of worksheets where users will enter data on whether orders of parts are accepted or rejected (via validated dropdown box), and the inspection level on those orders of parts (again via validated dropdown box.) Then they will fill in the date they entered the data, and their initials.
I want a sheet at the end (labeled "Output") that has a button assigned to a macro, which will shuffle through all of the sheets, and pull only the data from the date the button is clicked, to a week prior. So basically if it sees data posted today up to seven days ago, it will copy the 5 relevant cells to the output sheet. The problem is that I'm going to have each worksheet set up as a product "family" which has several types of similar parts, and so there will be several separate sets of data on each sheet.
I'll attach the workbook I have created thus far, and the programming is within it. I know I'm close, and I don't think that this is a particularly difficult thing to do. I just can't figure out what kind of code I will need to copy the specific cells pertaining to each date. Hopefully the workbook will help explain what I'm trying to do better than my own convoluted words.
Re: Macro to loop through all worksheets, pulling a range of cells if criteria matche
try the macro in the attached workbook . add more sheets and more data to test it. click the compile button.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Search Engine Friendly URLs by vBSEO 3.6.0 RC 1