如何提取跨越1000个“工作表”的Microsoft Excel文档的特定单元格(行,列)的内容?

我有一个Excel文档,其中包含超过1000人“联系人信息”(每人一张)。

第8行和第C列包含每个1000张以上的人的家庭地址。

我怎样才能从每张纸上提取(第8行,列C),而无需从每张纸上手动复制/粘贴它们?

最后,我想所有的家庭地址粘贴到MS Word文档,可以打印在特殊的可打印地址标签纸上。

有没有脚本会做到这一点? 写一个很简单吗? 将不胜感激所有/任何build议。 谢谢!

这应该让你开始。 如果您遇到困难,请发布您的代码并解释不能正常工作。 首先在工作簿的副本中进行testing,以防止意外覆盖您不想要的内容。

Sub HarvestAddresses() Dim ws As Worksheet Dim target As Worksheet Dim rng As Range Dim i As Integer ' We will harvest all addresses onto the target sheet Set target = Sheets("Sheet1") ' First address will be copied to the target.Range, and subsequent addresses ' get copied to the cells below Set rng = target.Range("A1") i = 0 ' We copy the value from "C8" in every worksheet in our workbook ' to the target For Each ws In Worksheets rng.Offset(i) = ws.Range("C8") i = i + 1 Next End Sub