我在Excel工作表1中有一个pivottable,如下所示: 行标签是“代号”'和#rulenumber'。
RowLabels Value
Codename1 2315(total)
5 5
10 249
25 60
40 0
50 10
60 1991
Codename2 (total)
5 xx
10 xx
25 xx
40 xx
50 xx
... xx
我在工作表2中有另一个表需要从代号中提取一组确定的规则。所以,如果我的规则是那些小于或等于50的规则,那么我将得到以下结果:
对于codename1,我将得到324,对于codename2,我将获得xx值。
我该怎么做?我尝试了一个getpivotdata函数,但它不起作用,因为据我所知,它在pivottable中可以看到值。
我可以使用宏甚至使用像c#这样的语言来解决这个问题。
答案 0 :(得分:0)
假设:
PT的表格布局
columns_to_hide = ['A', 'C']
已在“字段设置”中签入
Repeat item labels
位于E列(因此在ColumnF中为Row Labels
)
Codenames
在G中
I2:我......包含Values
然后在J2中复制到适合:
Codenames