Macro issue
Hello from Steved
Please how do I insert a row shift the cursor down one cell copy and then paste to the above. I got about 10,000 rows to do. Thankyou. Sub Broken() Selection.EntireRow.Insert Range("A61").Select Selection.Copy Range("A62").Select ActiveSheet.Paste End Sub |
Macro issue
Try this: Sub Unbroken() Selection.EntireRow.Insert ActiveCell.Offset(1, 0).Copy ActiveCell.PasteSpecial End Su -- CaptainQuattr ----------------------------------------------------------------------- CaptainQuattro's Profile: http://www.excelforum.com/member.php...fo&userid=3276 View this thread: http://www.excelforum.com/showthread.php?threadid=54494 |
Macro issue
Thankyou CaptainQuattro
"CaptainQuattro" wrote: Try this: Sub Unbroken() Selection.EntireRow.Insert ActiveCell.Offset(1, 0).Copy ActiveCell.PasteSpecial End Sub -- CaptainQuattro ------------------------------------------------------------------------ CaptainQuattro's Profile: http://www.excelforum.com/member.php...o&userid=32763 View this thread: http://www.excelforum.com/showthread...hreadid=544940 |
Macro issue
Sub InsertRows()
Dim i As Long Application.ScreenUpdating = True For i = Cells(Rows.Count, "A").End(xlUp).Row To 1 Step -1 Rows(i).Insert Rows(i + 1).Copy Cells(i, "A") Next i Application.ScreenUpdating = True End Sub -- HTH Bob Phillips (remove xxx from email address if mailing direct) "Steved" wrote in message ... Thankyou CaptainQuattro "CaptainQuattro" wrote: Try this: Sub Unbroken() Selection.EntireRow.Insert ActiveCell.Offset(1, 0).Copy ActiveCell.PasteSpecial End Sub -- CaptainQuattro ------------------------------------------------------------------------ CaptainQuattro's Profile: http://www.excelforum.com/member.php...o&userid=32763 View this thread: http://www.excelforum.com/showthread...hreadid=544940 |
Macro issue
Thankyou Bob.
"Bob Phillips" wrote: Sub InsertRows() Dim i As Long Application.ScreenUpdating = True For i = Cells(Rows.Count, "A").End(xlUp).Row To 1 Step -1 Rows(i).Insert Rows(i + 1).Copy Cells(i, "A") Next i Application.ScreenUpdating = True End Sub -- HTH Bob Phillips (remove xxx from email address if mailing direct) "Steved" wrote in message ... Thankyou CaptainQuattro "CaptainQuattro" wrote: Try this: Sub Unbroken() Selection.EntireRow.Insert ActiveCell.Offset(1, 0).Copy ActiveCell.PasteSpecial End Sub -- CaptainQuattro ------------------------------------------------------------------------ CaptainQuattro's Profile: http://www.excelforum.com/member.php...o&userid=32763 View this thread: http://www.excelforum.com/showthread...hreadid=544940 |
All times are GMT +1. The time now is 07:15 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com