Name the cell range containing your "data dump". The best name to use is 'Database'. Use this name as the data source range for your PivotTable.On 2003-02-06 15:45, johngalt62 wrote:
I have a data dump that has a different number of rows each time I run it. I created a macro to create a pivot table. The first part of the Macro is to go to A1 and highlight all the way to the right then all the way down. Then I create the pivot table.
The problem is that the pivot table code in the macro hardwrites the columns and rows from the first time that I created the macro. For example, if there were 40 rows when I created the macro, the pivot table in the macro will always grab only 40 rows on future runs, regardless of what has been highlighted (selected) or how many rows there acutally are.
I would think that there would be a way to replace the hard coded rows and columns in the Pivot Table portion of the macro but I can't figure out what it would be.
Can you assist? Thnks in advance.
$Who Is John Galt$


LinkBack URL
About LinkBacks



Reply With Quote

Bookmarks