Excel 2007 VBA - 复制表已过滤以响应另一个工作表上的更改事件 [英] Excel 2007 VBA - Copy table filtered in response to change event on another sheet

查看:60
本文介绍了Excel 2007 VBA - 复制表已过滤以响应另一个工作表上的更改事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望从sheet2上的单元格M1中的列表中进行选择,并将更改事件过滤器在sheet1上过滤表格,然后将该表格中3列的过滤内容复制到sheet2上的A2。  sheet2上的范围a2:c500是一个图表系列,它将更新
以响应sheet2上M1的选择。  M1的列表与sheet1表格的col  1的过滤器中显示的相同。 该表的摘录如下。使用sheet2 M1上的更改事件过滤表格很简单,但我尝试复制的所有
选择并复制整个(未过滤的)表格。

I wish to select from list at cell M1 on sheet2 and have the change event filter a table on sheet1, then copy the filtered contents of 3 columns from that table to A2 on sheet2.  The range a2:c500 on sheet2 is the series for a graph that will update in response to the selection at M1 on sheet2.  The list for M1 is the same as appears in the filter for col 1 of the sheet1 table.  An extract of the table is below. Filtering the table with change event on sheet2 M1 is easy, but everything I try for copy selects and copies the whole (unfiltered) table.






< td width ="64"height ="20"style =""> String















































Chainage Offset depth
MC01 1 0.1 0.175
MC01 1 0.5 0.176
MC01 1 1 0.175
MC02 2 0.1 0.176
MC02 2 0.5 0.175
MC02 2 1 0.176
MC01 3 0.1 0.175

String Chainage Offset depth
MC01 1 0.1 0.175
MC01 1 0.5 0.176
MC01 1 1 0.175
MC02 2 0.1 0.176
MC02 2 0.5 0.175
MC02 2 1 0.176
MC01 3 0.1 0.175

推荐答案

试试VBA论坛
http://social.msdn.microsoft.com/forums/ en-US / isvvba / threads /

kaymaf


这篇关于Excel 2007 VBA - 复制表已过滤以响应另一个工作表上的更改事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆