Insert Cells

  • Thread starter Thread starter venkat
  • Start date Start date
V

venkat

Hi,



I want to select 2 cells in column wise from the active cell and
need to insert 5 cells between them (using
"XlInsertShiftDirection.xlShiftToRight". Can any one tell me the way to do
this task?



Thanks in advance,

Venkat
 
How about just selecting one cell in the column and inserting 5 cells after it.

activecell.offset(1,0).resize(5,1).insert shift:=xldown

If you wanted to insert 5 complete rows, you could use:
activecell.offset(1, 0).resize(5, 1).entirerow.insert
 

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