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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top