Status
Not open for further replies.
1 - 3 of 3 Posts

#### Arbeeone

·
##### Registered
Joined
·
3 Posts
Discussion Starter · ·
Hi,
I'm manipulating a large file and want to insert rows programatically within VBA so that I can include sub-totals and also some other formatting to make the output look better. I'm using the Range(Cells(1,1),Cells(r,1)).Select method elsewhere (where 'r' is the row number), but this doesn't work when I come to defining a row where I want to insert additional rows.

Any help on how I can insert at rows at variable points from within VBA would be greatly appreciated!

rsb

#### OBP

·
##### Registered
Joined
·
19,896 Posts
One way to learn is to record a macro of you inserting rows.

#### Rollin_Again

·
##### Registered
Joined
·
4,916 Posts
If r is the variable row number, you can insert rows by using

Rows(r).Insert

Rollin

1 - 3 of 3 Posts
Status
Not open for further replies.