Macro - move active cell to another column; same row

  • Thread starter Thread starter BLW
  • Start date Start date
B

BLW

I am writing a macro where it starts off with a (startrow) reference that is
a value in an active cell. The macro inserts new rows and formatings. At
the end I want it to enter a value into the cell two columns to the right of
the (startrow). I am having trouble getting it to select the right cell - it
keeps selecting the (startrow) cell and changing that value.

How do I get it to move to another column with only specifying how many
columns over to move and not an exact column.
 
Hi BlW,

Try using the Range's Offset property.

For example, try someting like:

Dim myVal as Long

myVal =20

Range(StartCell).Offset(0,2).Value = myVal
 

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