Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I Calculate Check Digit for UPC A - the 13th warrior | Excel Discussion (Misc queries) | |||
Reference every 13th cell from another tab. | Excel Discussion (Misc queries) | |||
copy only the 1st, 7th, 13th, 19th, 25th.....row only | Excel Discussion (Misc queries) | |||
Sum function that add every 13th row... | Excel Discussion (Misc queries) | |||
Insert Concatenate Formula | Excel Programming |