我想循环显示一列,偏移一排,然后在下面的行的值上加1:
示例:
A 1 ..... 8 2 ..... 7 3 ..... 6 4 ..... 5
我已经构建了代码(在下面共享),以识别并填充底部行的正确值(基于另一个电子表格),并填充了上面的单元格。但是努力使其循环到列(A7)的第一行
Dim wscombined As Worksheet
Dim wspsimp As Worksheet
Set wscombined = ThisWorkbook.Worksheets("2013-2018 Combined")
Set wspsimp = ThisWorkbook.Worksheets("Pipeline simplified")
u = Application.WorksheetFunction.Max(wscombined.Range("A7:A50"))
'Fill latest new completed transaction with next UniqueID
LastRowU = wspsimp.Range("J" & Rows.Count).End(xlUp).Row
Cells(LastRowU, 8).Offset(, -7).Value = u + 1
Z = Cells(LastRowU, 8).Offset(, -7)
Cells(LastRowU, 8).Offset(-1, -7).Value = Z + 1