vba的新手,需要帮助将数据从一张纸复制到另一张 [英] new to vba, need help copying data from one sheet to another

查看:82
本文介绍了vba的新手,需要帮助将数据从一张纸复制到另一张的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要遍历工作簿中的所有工作表,并查找特定工作表名称的列表。 对于我发现的第一个,我需要将该表的内容复制到新的工作表。 在找到第一个之后,我需要从第2行开始复制工作表的内容
并粘贴到新创建的工作表的第一个可用行中。

I need to loop through all sheets in a workbook and look for a list of specific sheet names.  For the first one I find, I need to copy the contents of that sheet to a new worksheet.  After the first one I find, I need to copy the sheet's contents beginning with row 2 and paste in the first available row of the newly created sheet.

需要帮助!  ;我也需要帮助理解VBA,所以如果你知道一本好书或绝对初学者的网站,请传递它。

Need help!  I also need help in understanding VBA so if you know a good book or website for the absolute beginner, please pass it along.

谢谢

推荐答案

您好crockee,

Hi crockee,

您需要一些帮助才能将数据从一张纸复制到另一张。

you want some help to copy data from one sheet to another.

这是一个提示。尝试在Excel中记录您的方式。您可以录制宏,然后可以显示代码。以下是示例代码

Here is a tip. Try to record your way in Excel. You can record macros and after that you can show the code. Here is a sample code


  Range("L12:Q16").Select
  Selection.Copy
  Sheets("Sheet2").Select
  Range("D31").Select
  ActiveSheet.Paste


这篇关于vba的新手,需要帮助将数据从一张纸复制到另一张的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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