ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   INSERT A ROW AFTER EVERY 5 CELLS IN A SHEET THAT HAS DATA OF 120 (https://www.excelbanter.com/excel-discussion-misc-queries/77998-insert-row-after-every-5-cells-sheet-has-data-120-a.html)

JVR

INSERT A ROW AFTER EVERY 5 CELLS IN A SHEET THAT HAS DATA OF 120
 
I want to insert rows after every 5 cells in a excel file that has data of
120 rows. I dont want to start inserting every single time. Is there a
function to insert a rows in a file at an interval?

Chip Pearson

INSERT A ROW AFTER EVERY 5 CELLS IN A SHEET THAT HAS DATA OF 120
 
Try

Dim RowNdx As Long
For RowNdx = 1 To 200 Step 6
Rows(RowNdx).Insert
Next RowNdx



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"JVR" wrote in message
...
I want to insert rows after every 5 cells in a excel file that
has data of
120 rows. I don't want to start inserting every single time. Is
there a
function to insert a rows in a file at an interval?




JS

INSERT A ROW AFTER EVERY 5 CELLS IN A SHEET THAT HAS DATA OF 120
 
Hi JVR,

Go to http://www.andrewsexceltips.com/my_utilities.htm and download the
utillities. I got this tip this week from this discussion group and it is
very helpful and it is free! When it is installed on your computer, just go
to the Andrew's Utilities tool bar, then to the "sheet utilities" and select
"show selection tools". There are many functions that can do the work! and
much more.

JS

"JVR" wrote:

I want to insert rows after every 5 cells in a excel file that has data of
120 rows. I dont want to start inserting every single time. Is there a
function to insert a rows in a file at an interval?


JS

INSERT A ROW AFTER EVERY 5 CELLS IN A SHEET THAT HAS DATA OF 1
 
Where do I write this code?

JS

"Chip Pearson" wrote:

Try

Dim RowNdx As Long
For RowNdx = 1 To 200 Step 6
Rows(RowNdx).Insert
Next RowNdx



--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"JVR" wrote in message
...
I want to insert rows after every 5 cells in a excel file that
has data of
120 rows. I don't want to start inserting every single time. Is
there a
function to insert a rows in a file at an interval?






All times are GMT +1. The time now is 03:29 PM.

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