View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default Macro to go to next blank cell in column

I assume you want to by-pass extraneous blanks and go to the first blank row
below all data.

Easiest is to go to bottom of column then come back up from there.

Sub findbottom()
ActiveSheet.Cells(Rows.Count, 1).End(xlUp) _
.Offset(1, 0).Select
End Sub

Or to set that cell as a range to copy to.........

Set rng1 = ActiveSheet.Cells(Rows.Count, 1).End(xlUp) _
.Offset(1, 0)


Gord Dibben MS Excel MVP

On Tue, 27 Feb 2007 21:21:16 -0800, RJB wrote:

I've read what I could on this website, and in books, and I'm still a bit,
well, lost.

Every week, I will be dumping data into a spreadsheet. Every week, it will
be various lengths... One week 250 rows, the next 128, the next 372, etc.

I am doing some other stuff with Macros, but I need to get the cursor to go
to the FIRST blank cell in a column.

If I'm not running a Macro, I would just type "Ctrl" + Down Arrow to get to
the last FILLED ("Active"?) cell, and then would just Down-Arrow again to get
to the blank one directly below.

When I try to teach a Macro how to do this, it always remembers the SPECIFIC
cell I chose, so it will either go to the middle of nowhere, or start
overwriting in the table.

(In other words - the three lists I mentioned above. Cell A251 would be the
first blank in the first. What I want the Macro to do the following week is
go to A129, and the following week A373. The best I've been able to do is get
it to go to A251 EVERY FLIPPIN' TIME.)

Please help.

And please assume I am an absolute moron. If you just type something like
"DIM.CELL ="9999"
Plus.GoTo.ApplyDirectlyToTheForehead.ApplyDirectl yToTheForehead."
... I will be totally dumbfounded.

Thanks!