ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   CREATE AN EMPTY ROWS (https://www.excelbanter.com/excel-programming/393861-create-empty-rows.html)

lbrrenga

CREATE AN EMPTY ROWS
 
Hi,

Can you please guide me how to create an empty rows (by using macros)
in a spread sheet contains 300 rows of data?

Thanks

Renga


Bob Phillips

CREATE AN EMPTY ROWS
 
On row in one place?

Rows(200).Insert

Many rows in one place?

Rows(200).Resize(10).Insert

One row in many places?

For i = 1 To 300 Step 20
Rows(i).Insert)
Next i

Many rows in many places?

For i = 1 To 300 Step 20
Rows(i).Resize(5).Insert)
Next i

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"lbrrenga" wrote in message
oups.com...
Hi,

Can you please guide me how to create an empty rows (by using macros)
in a spread sheet contains 300 rows of data?

Thanks

Renga




Dave Peterson

CREATE AN EMPTY ROWS
 
Typo alert.

Don't include the closing paren ")" after the .insert

Bob Phillips wrote:

On row in one place?

Rows(200).Insert

Many rows in one place?

Rows(200).Resize(10).Insert

One row in many places?

For i = 1 To 300 Step 20
Rows(i).Insert)
Next i

Many rows in many places?

For i = 1 To 300 Step 20
Rows(i).Resize(5).Insert)
Next i

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"lbrrenga" wrote in message
oups.com...
Hi,

Can you please guide me how to create an empty rows (by using macros)
in a spread sheet contains 300 rows of data?

Thanks

Renga


--

Dave Peterson


All times are GMT +1. The time now is 04:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com