ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Move down cell (https://www.excelbanter.com/excel-discussion-misc-queries/68171-move-down-cell.html)

SusieQ

Move down cell
 

Hi,

How can i use VBA to move down a cell in excel?

thanks


--
SusieQ
------------------------------------------------------------------------
SusieQ's Profile: http://www.excelforum.com/member.php...o&userid=30818
View this thread: http://www.excelforum.com/showthread...hreadid=506285


Ian

Move down cell
 
ActiveCell.Offset(1, 0).Select

--
Ian
--
"SusieQ" wrote in
message ...

Hi,

How can i use VBA to move down a cell in excel?

thanks


--
SusieQ
------------------------------------------------------------------------
SusieQ's Profile:
http://www.excelforum.com/member.php...o&userid=30818
View this thread: http://www.excelforum.com/showthread...hreadid=506285




Bob Phillips

Move down cell
 
It is rarely necessary to select in VBA, and better not to. You could always
do something like

For i = 1 To 100
If Cells(i,"A").Value = 10 Then
Cells(i,"A").Offset(0,1).Value = Now
End If
Next i

which does no selecting and is more efficient.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Ian" wrote in message
...
ActiveCell.Offset(1, 0).Select

--
Ian
--
"SusieQ" wrote in
message ...

Hi,

How can i use VBA to move down a cell in excel?

thanks


--
SusieQ
------------------------------------------------------------------------
SusieQ's Profile:
http://www.excelforum.com/member.php...o&userid=30818
View this thread:

http://www.excelforum.com/showthread...hreadid=506285







All times are GMT +1. The time now is 05:44 PM.

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