VBA将光标向下移动到列A中具有值的下一行?

列A在一些行中具有值,在其他行中为空白。

我在其他专栏。 在我所在的行中,A列是空白的。

我想要一个macros,它将移动我的光标 – 保留在当前列 – 直到它在A列不是空白的行。

这似乎很容易,但我不知道VBA。 任何帮助?

Sub MoveDownBasedOnColumnA() Dim CurCell As Range Set CurCell = ActiveCell Dim CurCellInA As Range Set CurCellInA = Me.Columns("A").Cells(CurCell.Row) If IsEmpty(CurCellInA.Offset(1, 0).Value) Then CurCell.EntireColumn.Cells(CurCellInA.End(xlDown).Row).Select Else CurCell.EntireColumn.Cells(CurCellInA.Row + 1).Select End If End Sub 
 Sub a() i = ActiveCell.Row ret = i j = ActiveCell.Column While (Cells(i, 1).Value = "" And i < 16000) i = i + 1 Wend If (i = 16000) Then i = ret Application.Goto Reference:=Cells(i, j) End Sub 

控制“失控”,当你在下面列A使用的单元格的限制