How do I move ot next row in macro

  • Thread starter Thread starter JamesL
  • Start date Start date
J

JamesL

I have an excel macro where I need to tell the selection to move down one
row from the currently select row.

What is the correct syntax to do that?

James Lysaght
 
JamesL said:
I have an excel macro where I need to tell the selection to move down one
row from the currently select row.

What is the correct syntax to do that?


Hi James,

ActiveCell(2, 1).Select

However, it is rarely necessary (and is usually inefficient) to make
physical selections. So, instead of selecting, you might do something like:

With ActiveCell(2, 1)
If .Value > 10 Then
.Interior.ColorIndex = 36
Else
.Interior.ColorIndex = 5
End If
End With
 
Back
Top