The key to the enterprise is Excel Tables. Some of the advantages of Excel tables are that they know how big they are (number of rows and columns) and that they remember formulas and copy them down automatically.
I took your source data and named it Table_Source. I took the summary and named it Table_Summary.
I made a small pivot table from the source data and put it on the parameters page. A pivot table is the quickest and easiest way I know to get a unique list of values. Since this pivot table is reading a table as its source data, it will always reference exactly the right number of rows.
I “overlaid” the pivot table with a named dynamic range: Drawing_Numbers =OFFSET(Parameters!$A$2,0,0,COUNTA(Parameters!$A:$A)-1,1)
I also changed one formula (the one that looks up the drawing title) to show another advantage of tables: natural language syntax: =IFERROR(INDEX(Table_Source,MATCH([@[Drawing Numbers]],Table_Source[Drawing No.],0),3),"").
Otherwise I kept your original formulas.
I used VB code to do the copying.
First I cleared out all the old data (ClearTable). Then I used a pointer (cl) to go down the list of drawing numbers and insert them into the Summary Table. Merely populating the first cell is enough to kick off all the formulas.
To learn more about tables, see this article:
http://www.utteraccess.com/wiki/inde...ables_in_Excel.
You may have to change some code. If the summary and source are on different pages you will have to change the page name. Also the column that gets populated by the pointer (Column I in this case), might have to be changed depending on where you move the Summary Table.
You will notice that there isn't a lot of code: Excel Tables did most of the work for me.
Bookmarks