Go to Blank Cell Macro Problem

E

Emma Watkins

Hi
I am trying to get a macro to go to the first blank cell in a specific
column
i.e. column A has data from row A1 to A15. I'd want to run a macro that will
select cell A16.
I found this code below which does this on a 'Normal' sheet.
The problem i have is that the window is split and frozen at cell A1 (to
retain headings and the Button for the macro).
This seems to be preventing the code from running correctly.
Can anyone suggest an alteration to the code, or a different approach?
.....Sub findfirstempty()
Set Rng = Range("a2")
If Not IsEmpty(Rng.Value) Then
If IsEmpty(Rng(2).Value) Then
Set Rng = Rng(2)
Else
Set Rng = Rng.End(xlDown)(2)
End If
End If
Rng.Select
End Sub.......Thanks in advancePaul
 
J

JulieD

Hi Paul

works fine as is for me (but i prefer to use window / freeze panes as an
alternative to window / split to keep row 1 displayed)

what happens when you run it?

Cheers
JulieD
 
E

Emma Watkins

Hi
When i ran the macro the cell highlighted with no problem, until i closed
the workbook and re-opened it. Then when i clicked the macro it just
highlighted the 'split & frozen' part of the window at Cell A1.
Reading your reply, i tried just freezing the panes, it seems to work Ok.
Thanks


Paul
 
Top