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
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
"Mike Mike" <mm@mitechhostREMOVE.com> wrote in message
news:LkMaf.233803$p_1.93541@tornado.tampabay.rr.com...
>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
>
Typo:
Change
RowNdx = 4
to
RowNdx = 5
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"Chip Pearson" <chip@cpearson.com> wrote in message
news:%23aP8QHW4FHA.2196@tk2msftngp13.phx.gbl...
> 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
>
>
> "Mike Mike" <mm@mitechhostREMOVE.com> wrote in message
> news:LkMaf.233803$p_1.93541@tornado.tampabay.rr.com...
>>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
>>
>
>
It worked.
Thank you!!
"Chip Pearson" <chip@cpearson.com> wrote in message
news:uQIAkJW4FHA.3636@TK2MSFTNGP09.phx.gbl...
> Typo:
>
> Change
> RowNdx = 4
> to
> RowNdx = 5
>
>
> --
> Cordially,
> Chip Pearson
> Microsoft MVP - Excel
> Pearson Software Consulting, LLC
> www.cpearson.com
>
>
>
>
>
> "Chip Pearson" <chip@cpearson.com> wrote in message
> news:%23aP8QHW4FHA.2196@tk2msftngp13.phx.gbl...
>> 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
>>
>>
>> "Mike Mike" <mm@mitechhostREMOVE.com> wrote in message
>> news:LkMaf.233803$p_1.93541@tornado.tampabay.rr.com...
>>>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
>>>
>>
>>
>
>
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks