+ Reply to Thread
Results 1 to 2 of 2

Macro to loop through all worksheets, pulling a range of cells if criteria matched.

  1. #1
    Registered User
    Join Date
    04-14-2009
    Location
    Dover, Ohio
    MS-Off Ver
    Excel 2003
    Posts
    1

    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.

    Thanks, guys.
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    02-27-2008
    Posts
    764

    Re: Macro to loop through all worksheets, pulling a range of cells if criteria matche

    Hi
    try the macro in the attached workbook . add more sheets and more data to test it. click the compile button.
    Ravi
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1