将单元复制到另一个工作表并自动填充复制的单元10次

我需要将C10中的单元格内容从一张表格(称为“新客户”)复制到另一张表格(称为“库存”)下一个可用行。

一旦单元格被复制,它应该被复制或自动填充下来10次。 因此,“广告资源”表中的10行具有相同的客户ID填充。

注意:这个macros将被多次运行,它应该总是填充“库存”表中的任何下一个可用的10行是在这一点上。 我还没有弄清楚自动填充部分。 那就是我需要你帮忙的地方,剩下的就是应该的。 有想法该怎么解决这个吗?

Sub copyCustomer() 'copy customer ID into inventory sheet. Then autofill inventory 10 times. 'need for this to OFFSET to add a new customer next time macro is ran. Set Source = Sheets("New Customers") Sheets("New Customers").Select Range("C10").Select Selection.Copy Sheets("Inventory").Select Range("B" & Rows.Count).End(xlUp).Offset(1).Select ActiveSheet.Paste 'Autofill this 10 times End Sub 

试试这个(取代你所有的代码)

 Sub copyCustomer() Sheets("New Customers").Range("C10").Copy Sheets("Inventory").Range("B" & Rows.Count).End(xlUp).Offset(1).Resize(10) End Sub