go to first blank cell

  • Thread starter Thread starter raymondsum
  • Start date Start date
R

raymondsum

Hi,

I just want to go to first blank cell (eg A3) in a specified column. If
I used Selection(x1Down), then it goes to A2, not A3.
How to write macro to go to A3?

Column A
A1 3
A2 4
A3
A4 5
 
Raymond?

Using your exact example, the following would work

Sub FirstBlank()
Selection.End(xlDown).Offset(1, 0).Select
End Sub

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
(e-mail address removed)
 
More generally to select the first blank cell in Column A:

Sub FirstBlank()
Range("A:A").Find("", Range("A:A")(Range("A:A").Rows.Count)).Select
End Sub

Or more succinctly for the operative command,

Sub FirstBlank()
Dim rng As Range
Set rng = Range("A:A")
rng.Find("", rng(rng.Rows.Count)).Select
End Sub

Both of the above assume that the relevant sheet is the active sheet
when the procedure is run.

Alan Beban
 
Back
Top