English 中文(简体)
当电池价值发生变化时,过滤器在纸板上
原标题:When the value in a cell changes change the filter on a pivot table

我已经读过一段轨道,达到了SO点。 我的排在外衣中,让我改换名字,在改名时,“C3”的数值就会改变(如果是这样的话,在另一个表上指另一个电池3),如果“C3”的数值发生变化,我想在另一个表格(现在的表格6)上作一个纸板表,更新其在领土上的过滤器,以反映“C3”的新价值。

就像一次对我来说的事情一样,因此,我 around笑了,发现驻外使团有事件(大!),但我无法让我的活动实际上做任何事情。 在我作为宏观管理时,我有工作要做,但我真的希望是,每当“C3”细胞变化的价值发生时,就自动操作。

这里是我迄今为止所尝试的:

 Sub Worksheet_Change(ByVal Target As Range)
 If Not Application.Intersect(Target, Sheets("Current Status").Range("C3")) Is Nothing Then
Sheets("Sheet6").PivotTables("PivotTable5").PivotFields("territory_id"). _
    ClearAllFilters
Sheets("Sheet6").PivotTables("PivotTable5").PivotFields("territory_id").CurrentPage _
    = Sheets("Current Status").Range("C3").Value
 End If
 End Sub

最新情况:我发现,如果我把上述代码放在表一节(表2),而不是放在新的模块中,那么,如果我实际加入该守则,然后打入该守则,我就可以这样做。 现在,我很想知道,如果我没有手工输入价值和打入,是否有办法这样做。 我只想能够利用我下台的菜单选择新的名称,如果由于下台的挑选人更新了纸面表,则3元的变动值会增加。

一如既往地感谢你。

最佳回答

问题是,C3并没有实际改变,因为它只是更新的公式参照。 是否根据数据鉴定和在囚室中“放下选人”?

If it s based on a cell, set your target to be the target cell, not C3 -> because C3 is just a formula reference, and your drop down cell is the one actually changing.

如果它以形式为基础,则在形式控制交换活动中采用代号。

问题回答

暂无回答




相关问题
import of excel in SQL imports NULL lines

I have a stored procedure that imports differently formatted workbooks into a database table, does work on them then drops the table. Here is the populating query. SELECT IDENTITY(INT,1,1) AS ID ...

Connecting to Oracle 10g with ODBC from Excel VBA

The following code works. the connection opens fine but recordset.recordCount always returns -1 when there is data in the table. ANd If I try to call any methods/properties on recordset it crashes ...

Excel date to Unix timestamp

Does anyone know how to convert an Excel date to a correct Unix timestamp?

C# GemBox Excel Import Error

I am trying to import an excel file into a data table using GemBox and I keep getting this error: Invalid data value when extracting to DataTable at SourceRowIndex: 1, and SourceColumnIndex: 1. As ...

Importing from excel "applications" using SSIS

I am looking for any tips or resources on importing from excel into a SQL database, but specifically when the information is NOT in column and row format. I am currently doing some pre-development ...

热门标签