View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default VB command to move down one row

ActiveCell.Offset(1).Select


--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"merry_fay" wrote in message
...
Hiya,

I've just found this code & it works perfectly for me as is, but just as a
point of understanding & learning, the bit at the end:
Range("A1").Select
Why is this needed? Looking at it, it makes me think that cell A1 will be
selected again, which of course it isn't, so what does it do?

Thanks
merry_fay

"Debra Dalgleish" wrote:

When you record a macro, turn on Relative Reference to record cell
selection by position, instead of a specific cell address.

For example, select cell D2, and start recording.
Press the Relative Reference button on the Stop Recording toolbar
Press the down arrow key
Turn off Relative Reference, and stop recording

The resulting code is:
ActiveCell.Offset(1, 0).Range("A1").Select

When you run this code, it will move one cell down from whatever is the
active cell.

--
Debra Dalgleish
Excel FAQ, Tips & Book List
http://www.contextures.com/tiptech.html


" wrote:

Help! Is there a command to move down one row regardless of where you
are in the spreadsheet? When I use the autorecord, VB selects a
specific cell. Using Selection.End(xlDown).Select sequentially drops it
all the way to the last two. Help!