开发者

Excel copy x amount of columns below one cell

I am dealing with a chang开发者_运维技巧ing file and I would like to copy the last 10 rows of a certain column and then paste it into another worksheet, the original worksheet gets updated throughout the day.


Const COLUMN_INDEX = 1 ' Desired column

Sub CopyValues()
    Dim LastRow = [A65536].End(xlUp).Row ' Find the last row index
    Dim I
    For I = LastRow - 10 To LastRow
        'Do something with Cells(I, COLUMN_INDEX).Value
    Next I
End Sub
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜