Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 921
Default Insert Row every 13th row, then Concatenate

Hello,

Have a list in column A. Every 13th row, I'd like to add a row. Then in
that new row, I'd like to Concatenate the text in the first row with the text
in the 12th row (in cell A13). From there, it would step down another 13
rows, insert a row, and in that new cell concantenate the text from row 14
with that found in row 25.... and so on.

Help?! TIA
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,726
Default Insert Row every 13th row, then Concatenate

Public Sub Test()
Dim iLastrow As Long
Dim i As Long

With ActiveSheet
iLastrow = .Cells(.Rows.Count, "A").End(xlUp).Row
For i = (iLastrow \ 13) * 13 To 13 Step -13
.Rows(i + 1).Insert
.Cells(i + 1, "A").Value = .Cells(i - 12, "A").Value & .Cells(i,
"A").Value
Next i
End With
End Sub


--
---
HTH

Bob

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



"JEFF" wrote in message
...
Hello,

Have a list in column A. Every 13th row, I'd like to add a row. Then in
that new row, I'd like to Concatenate the text in the first row with the
text
in the 12th row (in cell A13). From there, it would step down another 13
rows, insert a row, and in that new cell concantenate the text from row 14
with that found in row 25.... and so on.

Help?! TIA



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 921
Default Insert Row every 13th row, then Concatenate

Perfect! Thanks a ton...........

"Bob Phillips" wrote:

Public Sub Test()
Dim iLastrow As Long
Dim i As Long

With ActiveSheet
iLastrow = .Cells(.Rows.Count, "A").End(xlUp).Row
For i = (iLastrow \ 13) * 13 To 13 Step -13
.Rows(i + 1).Insert
.Cells(i + 1, "A").Value = .Cells(i - 12, "A").Value & .Cells(i,
"A").Value
Next i
End With
End Sub


--
---
HTH

Bob

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



"JEFF" wrote in message
...
Hello,

Have a list in column A. Every 13th row, I'd like to add a row. Then in
that new row, I'd like to Concatenate the text in the first row with the
text
in the 12th row (in cell A13). From there, it would step down another 13
rows, insert a row, and in that new cell concantenate the text from row 14
with that found in row 25.... and so on.

Help?! TIA




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I Calculate Check Digit for UPC A - the 13th warrior AIRJACK Excel Discussion (Misc queries) 6 May 4th 23 07:46 PM
Reference every 13th cell from another tab. jordanpcpre Excel Discussion (Misc queries) 6 March 18th 08 04:57 PM
copy only the 1st, 7th, 13th, 19th, 25th.....row only vcff Excel Discussion (Misc queries) 6 January 15th 08 05:21 PM
Sum function that add every 13th row... Greg Excel Discussion (Misc queries) 9 March 8th 06 07:51 PM
Insert Concatenate Formula DARREN FONG via OfficeKB.com Excel Programming 3 December 31st 05 12:14 AM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"