Hi,
You're using an advanced filter, so it doesn't really matter if the data goes on the top or the bottom, does it? You could potentially just copy the current week's data from the Source Data and put it on the bottom of your data in the Working sheet. (Making a slight change to the formula in C2 -- perhaps to one listed below)
Alternatively, you could change the sort order on the SQL query so it produces the data in week ascending order and copy it that way.
In terms of adding the proper number of rows at the top manually, you may want to consider the following formulas on the Working sheet:
In this case, D2 would contain the number of entries for the current week.
If you're wanting to use VBA, basically you could just count the number of times the current week (in 'Source Data'!C2) appears in the source. Then you'd just have the macro insert that many lines at the top of your Working sheet and paste in the new data.
S
Bookmarks