Selecting more than one cell/colum with an offset statement?

  • Thread starter Thread starter Fred Holmes
  • Start date Start date
F

Fred Holmes

The vba statement:

ActiveCell.Offset(0, 3).EntireColumn.Select

Works just fine to select the third column to the right of the active
cell.

Is there a nice, clean, simple statement that would select the third
and fourth columns to the right, something like:

ActiveCell.Offset(0, 3:4).EntireColumn.Select

which doesn't work.

I'm basically trying to program a "column move" macro that prompts for
the column(s) to move, and how many column(s) to the right/left to
move it, and then performs the move. Is there one of those already out
there to copy?

Thanks,

Fred Holmes
 
Hi
ActiveCell.Offset(0, 3).Resize(1,2).EntireColumn.Select

Resize(1,2) leaves the row dimension at 1 and ups the column dimension
to 2.

regards
Paul
 

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