ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   VBA: move to the next cell down from anywhere in the sheet (https://www.excelbanter.com/excel-programming/346465-vba-move-next-cell-down-anywhere-sheet.html)

jmp

VBA: move to the next cell down from anywhere in the sheet
 

I am deleting rows based on a value in a column (< 16) and if the value
is 16 or greater I want to move down to the next row and check that
value and so on. i am using a Do Until value = "".

What is the code for moving down to the next cell below ActiveCell?


--
jmp
------------------------------------------------------------------------
jmp's Profile: http://www.excelforum.com/member.php...o&userid=29038
View this thread: http://www.excelforum.com/showthread...hreadid=487763


Nick Hodge

move to the next cell down from anywhere in the sheet
 
If deleting rows you should be going up, but if you are set doing it the way
you are

Activecell.Offset(1,0).Select

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
HIS


"jmp" wrote in message
...

I am deleting rows based on a value in a column (< 16) and if the value
is 16 or greater I want to move down to the next row and check that
value and so on. i am using a Do Until value = "".

What is the code for moving down to the next cell below ActiveCell?


--
jmp
------------------------------------------------------------------------
jmp's Profile:
http://www.excelforum.com/member.php...o&userid=29038
View this thread: http://www.excelforum.com/showthread...hreadid=487763




Leith Ross[_324_]

VBA: move to the next cell down from anywhere in the sheet
 

Hello Jmp,

ActiveCell.Offset(1, 0l).Select will select the next cell down from th
active cell. Here are some other examples of the Offset property
Movement is relative to the current cell. Rows move up if the Row i
negative and down if positive. Columns move left if the negative an
right if positive. The starting point is (0,0).

Move Down a Row, same Column use:
ActiveCell.Offset(1, 0)

Move Up a Row, same Column:
ActiveCell.Offset(-1, 0)

Move to Next Column, same Row:
ActiveCell.Offset(0, 1)

Move to Previous Coulmn, same Row:
ActiveCell.Offset(0, -1)

Sincerely,
Leith Ros

--
Leith Ros
-----------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...fo&userid=1846
View this thread: http://www.excelforum.com/showthread.php?threadid=48776



All times are GMT +1. The time now is 08:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com