当我尝试将范围定义为相对于当前单元格的单个单元格时,我收到范围失败的错误:
If target.Cells.Column = 2 Then
If target.Cells.Row > 3 Then
If target.Cells.Count = 1 Then
Range(ActiveCell.Offset(0, 1)).Select
End If
End If
End If
我知道我可以在当前单元格中创建范围,然后在之后进行偏移但我只想定义范围
答案 0 :(得分:0)
Dim c As Range
If target.Cells.Count = 1 Then
If target.Row > 3 and target.Column = 2 Then
Set c = target.Offset(0, 1)
'do something with c
End If
End If