VBA: How to specify 2nd cell of currently active row?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In a macro, I want to be able to set the value of the second cell of the
currently active row. How can I calculate the correct range or offset to do
this? For example, if the currently active cell is An, I want to set A2 to a
specific value.

Thanks,

Rich
 
Hi Rich

For a row
Cells(ActiveCell.Row, 2).Value = 100

For a column
Cells(2, ActiveCell.Column).Value = 100
 

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