Thread: Insert cells
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
munchkin munchkin is offline
external usenet poster
 
Posts: 57
Default Insert cells

I hope I can explain this.

My macro takes a record list that starts on A9 of one sheet and pastes it to
another sheet. The record list goes from column A-H w/varying number of
rows. I need the macro to copy the blank cells in columns I-N because I am
pasting this above a separate record list that goes from column A-N. I
thought by doing "Range(Selection, Selection.End(xlToRight)).Select" twice it
would always copy & insert the blank cells, but it doesn't work.

When I run the macro it ignores the blank column I-N cells & the secondary
record list becomes separated. Columns A-H are moved below the inserted
cells, but columns I-N stay in their original place. What am I doing wrong?


Range("A9").Select
Range(Selection, Selection.End(xlDown)).Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy
Sheets("Sheet1").Select
Range("A8").Select
Selection.Insert Shift:=xlDown