多年来我没有编码,所以尽力传达我的目标.
我有一个主表单,其中包含许多项目的列表(在主服务器中列出了他们自己的单元格),它们同样有自己的编号表.此Master具有与行中所有其他项目相关的信息,在相应单元格下选择时,将该行信息复制到适用项目表中的下一个可用行.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim nextrow As Long, lastrow As Long, i As Long
nextrow = Sheet1.Cells(Rows.Count, "A").End(xlUp).Row + 1
nextrow = Sheet5.Cells(Rows.Count, "A").End(xlUp).Row + 1
nextrow = Sheet4.Cells(Rows.Count, "A").End(xlUp).Row + 1
nextrow = Sheet6.Cells(Rows.Count, "A").End(xlUp).Row + 1
nextrow = Sheet7.Cells(Rows.Count, "A").End(xlUp).Row + 1
nextrow = Sheet8.Cells(Rows.Count, "A").End(xlUp).Row + 1
nextrow = Sheet9.Cells(Rows.Count, "A").End(xlUp).Row + 1
nextrow = Sheet10.Cells(Rows.Count, "A").End(xlUp).Row + 1
nextrow = Sheet11.Cells(Rows.Count, "A").End(xlUp).Row + 1
nextrow = Sheet12.Cells(Rows.Count, "A").End(xlUp).Row + 1
nextrow = …Run Code Online (Sandbox Code Playgroud)