Posts by cshortt

    Re: I'm trying to set up a loop to pull data from multiple cells in multiple workshee

    No, it is named Table1 according to the name box to the left of the formula bar.
    One thing I did change was in the (NAME) field, I made all of the "G" numbers 3 digit numbers. For example G-01 is the NAME of the worksheet, G001 is the (NAME) of the worksheet. I did this because the numbers of all of the "G" go from 1 - 110. Without all of the (NAME) fields being 3 digit numbers, the order of the sheets in the list is not correct. Maybe that has something to do with it?

    Re: I'm trying to set up a loop to pull data from multiple cells in multiple workshee


    Here is a shot of my screen and what I getting when I run the update macro. I'm looking to skip the discussed worksheets to eliminate the first two lines on this table. The main reason is that the blank cells above the lines are used for filtering criteria. The way I have it set up, the table can be filtered by any one of the column headings. The added lines are causing problems with the filters.

    Re: I'm trying to set up a loop to pull data from multiple cells in multiple workshee

    Okay. I'm sorry about the quote thing. For some reason the reply (without quote) button was not showing up on my browser. I closed it down and restarted it, then reloaded the page and it's back now. My humble apologies.
    I did attach a sample workbook. It's in my first post.
    I think I may have found a work around. When the code copies the data in the cells it includes the sheets that I don't want it to include. Fortunately, it pus this incorrect data in the first three lines. So, on my list page, I inserted three lines above the first line and then hid the lines. This then puts the pasted data on the correct line. It's not perfect, but I'm getting closer.

    Re: I'm trying to set up a loop to pull data from multiple cells in multiple workshee

    Again, thanks for the help. The code works, accept for one thing. The loop still does not skip over the worksheets that I don't want it to pull data from. I don't get it. Everyone seems to use this command to try and get the code to skip those sheets, but nothing seems to make it skip them. I've tried renaming them still with no luck. I even set the properties to "VeryHidden" and that did not work either. Just keeps pulling data from them. The only way I can make it work correctly is to delete those sheets all together. Once I do that, none of my vehcile sheets work correctly since one of the sheets has my data validation information in it. Ugh! Frustrating.

    Re: I'm trying to set up a loop to pull data from multiple cells in multiple workshee

    Trebor76, thanks so much for the reply. I agree with you about how the database is set up. I built this some 15 years ago and it has more than doubled in size since then. I've been playing with other options on rebuilding this in a more easily manageable way. I actually have started rebuilding it in just the way you stated. But until I get that to work and decide exactly how it will be done, i'm trying to get something working as it exists now. I'll give your code a try today and let you know how it works out.
    One problem with the existing database is it almost 100mb in size due to all the photos and takes forever to open. If I split the database into separate workbooks I'm thinking it would load faster. Still in the planning stages of the second iteration of this database.

    Re: I'm trying to set up a loop to pull data from multiple cells in multiple workshee

    Thanks so much for the help and replies. I did as you suggested and it did not paste the correct data. I put a watch on ws and it is still selecting "Statistics" as the first workbook it pulls data from. Maybe I have the code in the wrong place or something else. I have pasted a copy of my full code for you to look at. Maybe that will help.

    I have a workbook that contains about 265 vehicle data worksheets. Each uniquely numbered vehicle has it's own worksheet with detailed information about that vehicle. Every vehicle page is identical, accept for the data stored in it. These pages are setup in rows and columns of data, but not in a line-by-line list. One of these pages is a list of all of these vehicles with certain cells of information that i need to pull over from each of the individual vehicle workbooks. I've been trying for days now to set up a loop to bring this information from each individual page to this line-by-line list with little to no success.

    Here is an example of what I am trying to do.

    First vehicle on the list is vehicle;

    A-01 (vehicle number, not cell reference) , I want the VBA code to go to A-01's worksheet and pull data from cells "B30", "B18", "B9", "B12", "B15", "B21", "B33", "B27", "J30", "F24", "H24", "D18". Then paste that data back to a row in the list of vehicles into cells "C7", "D7", "E7", "F7", "G7", "H7", "I7", "J7", "K7", "L7", "M7", "N7", in that order.
    Then I want it to go to vehicle A-02 (next worksheet) and copy the data from the same set of cells (B30, B18, B9....etc.) and copy that to the next row on the list worksheet, Then go back and do the same thing for vehicle A-03, then for A-04, then A-05........untill the end of the list.

    I can get the data from the first worksheet (vehicle A-01) but I can't figure out how to get the VBA to go to the next worksheet to get the next set of data and paste it.
    I have tried a For All loop with some success, but there are 4 or 5 worksheets that I want it to skip over because they contain data that is not relevant to the worksheet I am trying to build.
    One other thing I should note, currently the first page contains the data (entered manually) in a table. I am trying to get VBA to paste the data into that table.
    I hope this is clear. I've tried to describe it to the best of my ability. Thanks for any help you can offer.

    I have uploaded a small sample of the list with what I would like it to look like after running the macro and updating all of the