修剪空白数据/行,根据工作表名称重命名列标题,将数据从一张工作表移动到另一张工作表。
这就是我想要在 Microsoft Excel 2010 中执行的操作:
我有几个包含数据的电子表格,这些电子表格的数据位于多个工作表(底部的选项卡)中,但它们都采用相同的列/格式。但是,这些列上方可能有一两行额外的行,其中可能有文本,也可能为空白,所以我必须将其修剪掉。
我想将数据复制到主电子表格中。在主电子表格中,列以工作表命名,因此,为了自动执行此操作,我必须将复制的工作表的名称与列中的文本进行比较(它们始终位于第一行) 。
是否可以使用宏在不同的 Excel 文件之间移动数据?
This is what I want to do in Microsoft Excel 2010:
I have several spreadsheets with data in them, and the spreadsheets have the data in multiple sheets (the tabs at the bottom) but they are all in the same column/format. However, the columns may have an extra row or two above them that may have text or may be blank, so I would have to trim that off.
I want to copy the data into a master spreadsheet. In the master spreadsheet, the columns are named after the sheets so, in order to automate this, I would have to compare the name of the sheet that was copied from against the text in the columns (they will always be in the first row).
Is it even possible to move data between different Excel files with a macro?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用合并来实现此目的,无需使用宏。如果您是初学者,我建议您在使用宏之前开始尝试使用现有解决方案解决问题......
You can do that without macros using Consolidation. If you're a beginner, I suggest you start trying to solve the problem with existing solutions, before going to macros...
是的,这一切都是可能的。您可以在 Excel 中手动执行的任何操作通常也可以通过 VBA 执行。
如果您对 Excel VBA 编程一无所知,那么以下之一是一个不错的起点网站。我特别推荐 此处 Chip Pearson 的著作。
Yes, this is all possible. Anything you can do manually in Excel you can generally also do through VBA.
If you know nothing at all about Excel VBA programming, then a good place to start is at one of these sites. I would particularly recommend Chip Pearson's body of work here.