Insert cell data every given amount of rows

  • Thread starter Thread starter Mike Mike
  • Start date Start date
M

Mike Mike

I got one column with data.
I want to insert a cell with text for a certain amount of rows in that
column.
How can I do that?

Example with text for each 4 rows:

From
1
2
3
4
5
6
7
8
9

to
1
2
3
4
TEXT
5
6
7
8
TEXT
9


Regards
Mike
 
Try the following:

Dim RowNdx As Long
RowNdx = 4
Do Until Cells(RowNdx, "A").Value = ""
Cells(RowNdx, "A").Insert
Cells(RowNdx, "A").Value = "Text"
RowNdx = RowNdx + 5
Loop



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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top