【问题标题】:How do I move the active selection to a certain column on the same row?如何将活动选择移动到同一行的某一列?
【发布时间】:2019-05-25 00:29:56
【问题描述】:

我连续选择了一个单元格。我希望选择保留在同一行上,但移动到同一行上特定列中的一系列单元格。

我向下移动了一个单元格并选择了一系列单元格并删除了如下内容:

ActiveCell.Offset(1, 0).Range("S1,A1:Q1").Select
Application.CutCopyMode = False
Selection.ClearContents

现在我想在同一行中选择 37:39 列。
有没有可以移动到特定列的功能?

【问题讨论】:

标签: excel vba


【解决方案1】:

考虑:

Sub marine()
    Dim rw As Long
    rw = Selection.Row
    Range(Cells(rw, 37), Cells(rw, 39)).Select
    MsgBox Selection.Address(0, 0)
End Sub

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-09-12
    • 1970-01-01
    • 2023-03-21
    • 1970-01-01
    • 2021-11-27
    • 1970-01-01
    • 1970-01-01
    • 2015-04-05
    相关资源
    最近更新 更多