Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automatic update
Hello
I want to update a pivot table when a cell is changed. Sub Oppdater() ' Oppdate Makro ' Oppdate pivot ' Private Sub date_Change() ' Oppdate if change Range("B8").Select ActiveSheet.PivotTables("Pivottabell1").PivotCache .Refresh End Sub -- Jakob http://www.pointshop.no/austgulen |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automatic update
Select the sheet tab which you want to work with. Right click the sheet tab
and click on 'View Code'. This will launch VBE. Paste the below code to the right blank portion. Get back to to workbook and try out. Check out the date cell in the below code it is B8 Check out the name of the table "PivotTable1" and adjust to suit Private Sub Worksheet_Change(ByVal Target As Range) Application.EnableEvents = False If Not Application.Intersect(Target, Range("B8")) Is Nothing Then ActiveSheet.PivotTables("PivotTable1").PivotCache. Refresh Application.EnableEvents = True End Sub If this post helps click Yes --------------- Jacob Skaria "Jakob" wrote: Hello I want to update a pivot table when a cell is changed. Sub Oppdater() ' Oppdate Makro ' Oppdate pivot ' Private Sub date_Change() ' Oppdate if change Range("B8").Select ActiveSheet.PivotTables("Pivottabell1").PivotCache .Refresh End Sub -- Jakob http://www.pointshop.no/austgulen |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automatic update
right click the sheet tab and select 'View Code' and then paste the following
code. It uses the sheet's CHANGE event to trap when an entry has been made. If the cell changed is the one you want, then the pt is refreshed... Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = Range("B9").Address Then Worksheets("Sheet1").PivotTables(1).PivotCache.Ref resh End If End Sub "Jakob" wrote: Hello I want to update a pivot table when a cell is changed. Sub Oppdater() ' Oppdate Makro ' Oppdate pivot ' Private Sub date_Change() ' Oppdate if change Range("B8").Select ActiveSheet.PivotTables("Pivottabell1").PivotCache .Refresh End Sub -- Jakob http://www.pointshop.no/austgulen |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Automatic update of filter | Excel Discussion (Misc queries) | |||
Automatic Update for Date | Excel Discussion (Misc queries) | |||
Automatic update of spreadsheet & automatic update between workboo | Excel Worksheet Functions | |||
Automatic Update | Charts and Charting in Excel | |||
Automatic update | Excel Discussion (Misc queries) |