Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / January 2007

Tip: Looking for answers? Try searching our database.

Insert Row every 13th row, then Concatenate

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JEFF - 31 Jan 2007 20:38 GMT
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
Bob Phillips - 31 Jan 2007 21:11 GMT
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

Signature

---
HTH

Bob

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

> Hello,
>
[quoted text clipped - 6 lines]
>
> Help?!   TIA
JEFF - 31 Jan 2007 21:42 GMT
Perfect!   Thanks a ton...........

> Public Sub Test()
> Dim iLastrow As Long
[quoted text clipped - 20 lines]
> >
> > Help?!   TIA
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.