Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Advanced filter in VBA messing with my chart
Ok let me say i fully understand how to name a range and in the source data
for a chart you use the formula =sheetname!rangename Problem arrises when my macro that runs an advanced filter with the source data and add data to the bottom of the range the chart reverts back to it's initial data source =sheet1!$a$4:$b$15 so even though it accept the named range intitailly once the advanced filter runs it ommits the named range. I am using 2007 and i never had this problem in 2003. What suggestions do you have for me? At the bottom you will see my code. Thank you!!!!! -- Thank you, Jennifer -- Private Sub Worksheet_SelectionChange(ByVal Target As Range) ''ActiveSheet.Unprotect 'On Error GoTo ws_exit 'Application.EnableEvents = False 'If Target.Row = 3 And Target.Column = 2 Then ''calculate criteria cell in case calculation mode is manual ' Worksheets("TankInventory").Range("ac2:ad2").Calcu late ' Worksheets("TankInventory").Range("Inventory_Pivot Table") _ ' .AdvancedFilter Action:=xlFilterCopy, _ ' CriteriaRange:=Sheets("TankInventory").Range("ac1: ad2"), _ ' CopyToRange:=Range("a6:b6"), Unique:=False ' Me.Range("B3").Select 'End If 'ws_exit: ' Application.EnableEvents = True ' 'ActiveSheet.Protect |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Advanced Filter - filter rows < | Excel Discussion (Misc queries) | |||
Why won't advanced filter return filter results? | Excel Worksheet Functions | |||
How do I use advanced filter to filter for blank cells? | Excel Discussion (Misc queries) | |||
"Criteria Range" in the "Data/Filter/Advanced Filter" to select Du | Excel Worksheet Functions | |||
advanced filter won't allow me to filter on bracketed text (-456.2 | Excel Discussion (Misc queries) |