I'd like to create a macro that would update a pivot table's data source to include new rows added into the original data. For example, the pivot table's data source is cells A1:D39 and it does not include row 40 which are the totals of the columns. I insert two new lines of data into rows 40 and 41 but the pivot table's data doesn't include the new line. The catch is that on row 42 (row 40 before I added the two new lines of data) it has the totals of each column, which I don't want included in the pivot table. Is there a way to detect which row in column A has the string 'Total' in it, and have the pivot table's data include all the rows up until that point?
Bookmarks