Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

inserting a row on an excel sheet 1

Status
Not open for further replies.

kenguru

Programmer
May 14, 2004
173
RO
Hello,

Can anyone point me out how can i insert a row in an excel sheet? I recorded a macro, and it gave me:
Sheets("ABC").Select
Rows("22:22").Select
Selection.Insert Shift:=xlDown

Isn't a simpel way, or more general way of doing it?

Thank you,
Kenguru
 


Hi,

I recommend using the Insert and Delete methods as little as possible. You might try appending a row to the bottom of your table and then sorting the table to achieve what the Insert would have done.

However, if you need to insert a row...
Code:
Sheets("ABC").Cells(22,1).entirerow.Insert Shift:=xlDown


Skip,

[glasses] [red][/red]
[tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top