View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.misc
Roger Govier Roger Govier is offline
external usenet poster
 
Posts: 2,886
Default automatically update pivot tables when dynamic named range is

Hi Deb
Or, add code to the pivot table sheet module, to refresh the pivot
table when you activate that sheet.


That's a much better idea as it would get triggered far less frequently,
and only when required..

--
Regards

Roger Govier


"Debra Dalgleish" wrote in message
...
Yes, a sheet moduls is different. You can right-click on a sheet tab,
and choose View Code, then paste the code there.

If column 8 is the last column in which you enter data, you could
change the code to reference that column.

Or, add code to the pivot table sheet module, to refresh the pivot
table when you activate that sheet. For example:

Private Sub Worksheet_Activate()
Me.PivotTables(1).PivotCache.Refresh
End Sub


Dave F wrote:
Hi Debra,

I entered the code in a module. (Is a sheet module different than a
plain old module? I know class modules are a different beast
entirely, and the code is NOT in one of those.)

To answer your other question, here's how my data is laid out.
Column A is column 1, column I is column 9, and, reading from column
A to column I i have the following column headers: Trans#, Year,
Month, Date, Category, Description, Type, Amount, Balance.

So, column 9 is Balance. That is a formula. The only columns that
are NOT formulas a Amount, Description, and Date. I suppose then
that means that Amount is the last piece of data I enter in a given
row. Does that imply that I should change If Target.Column < 9 Then
GoTo endsub

to

If Target.Column < 8 Then GoTo endsub

Thanks for any insight here.

Dave



--
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html