-1

Im trying to copy a graph from on sheet when a condition is met. For example

IF range ("G5") = "Team 1" Then

Copy and Paste Graph at range (H15:N31)

Then remove the graph when the work sheet is exited or another team is selected.

Any ideas on the VBA code i would need to make this happen.

I have attempted to use INDEX & MATCH fomrulas to populate a graph on the same sheet then hide the columns however this has not worked usually end up with N/a.

I have also seen various segments of code on the internet however dont fully understand how they have done what im asking.

4

1 回答 1

0

现在已经整理好了。我决定回去再试一次 INDEX & Match 看看我能不能让它工作。我发现我哪里出错了。

在数据相当分散之前,我引用它的方式是一个相当糟糕的方法。(这是在度过了非常糟糕的一天之后,我再也无法集中注意力,因此在这里问大家)。

我在索引的工作表上将数据重新排列为三个单独的类别。然后我将每个团队编号放在相关数据集旁边,例如:

      Productivity
Team 1 43.56%
Team 2 58.89%
Team 3 blah
Team 4 blah

然后在我构建图表的页面上,我使用了以下内容:

=IFERROR(INDEX('Team Overview'!S18:S21,(MATCH('Individual Overview'!G5,'Team Overview'!R18:R21,0)),1),0)

然后当我再次使用索引和匹配公式时。这次选择团队编号时,图表正确生成了数据。所有的数字都与相应的团队相对应,现在它是一种享受。

于 2013-09-10T07:56:56.987 回答