我正在尝试添加一个按钮,该按钮在最后一列的值之后添加一个新列。这行得通。
现在我想将值复制到新列。值应从第 32 行的最后一列复制到 A 列中具有值的最后一列。现在我有一个用于复制整列的代码。如何专注于特定范围?
Sub AddMeeting()
Dim ws As Worksheet
Dim lastcol As Long
Set ws = ActiveSheet
lastcol = ws.Cells(32, ws.Columns.Count).End(xlToLeft).Column
Columns(lastcol).Copy Destination:=Columns(lastcol + 1)
Range ((Cells.Columns.Count.End(xlLeft)) & Range(32)), (lastcol + 1) & Cells.Rows.Count.End(xlUp)
Application.CutCopyMode = False
End Sub