Insert 2 Rows Every Nth Row 


Insert 2 Rows Every Nth Row  Excel 
View Answers 
I would like a macro to insert 2 (or more) rows every 8th row.
Thanks.
B.
Thanks.
B.
Similar Excel Tutorials
How to Add, Remove, and Rearrange Columns and Rows in Excel
Adding, removing and rearranging columns is as easy as resizing. You just select your columns or rows, right click ...
Adding, removing and rearranging columns is as easy as resizing. You just select your columns or rows, right click ...
How to Resize Rows and Columns in Excel Quickly
Resizing rows and columns in Excel is an easy process. Simply left click in between the columns and drag the mouse ...
Resizing rows and columns in Excel is an easy process. Simply left click in between the columns and drag the mouse ...
Delete All Rows that Contain a Specific Value in Excel
Quickly find all rows in Excel that contain a certain value and then delete those rows. This is a simple technique ...
Quickly find all rows in Excel that contain a certain value and then delete those rows. This is a simple technique ...
How to Find and Understand Excel Functions
In this tutorial I am going to show you how to find and understand new Excel Functions. If you go to the Formulas t ...
In this tutorial I am going to show you how to find and understand new Excel Functions. If you go to the Formulas t ...
Helpful Excel Macros
Delete Hidden Rows in a Workbook
 This macro will delete hidden rows from every worksheet in an entire workbook. However, note that this will only delete
 This macro will delete hidden rows from every worksheet in an entire workbook. However, note that this will only delete
Delete Rows in Excel if Completely Empty
 This macro will delete only completely blank rows in an excel spreadsheet. It allows you to make a selection of rows, ru
 This macro will delete only completely blank rows in an excel spreadsheet. It allows you to make a selection of rows, ru
Delete Blank Rows in Excel
 This is a macro which will delete blank rows in excel. This version will delete an entire row if there is a blank cell
 This is a macro which will delete blank rows in excel. This version will delete an entire row if there is a blank cell
Delete Entire Rows Based on Predefined Criteria (Text)
 This macro will allow you to specify certain criteria and then to delete rows based upon that criteria. You will choose
 This macro will allow you to specify certain criteria and then to delete rows based upon that criteria. You will choose
Vlookup Macro to Return All Matching Results from a Sheet in Excel
 This Excel Macro works like a better Vlookup function because it returns ALL of the matching results. Run the
 This Excel Macro works like a better Vlookup function because it returns ALL of the matching results. Run the
Similar Topics
I attached the simple example worksheet I am using.
My goal is to have a macro that will always insert a new line between the specified range of rows which I gave a defined name of " COLUMNS".
I can get a macro to insert new rows, but if I add rows above where I am working, it no longer inserts rows into the right areas. You can see the macro I have in there.
If I insert rows above where my data is, the macro continues to insert the line in the same space instead of adjusting for inserted rows. How do I avoid this?
Hi,
I want to know that how i can insert rows after specifice selection
e.g i have two values in drop down menu in b4. Insert1,Insert2
if insert1 selected from drop down then there is no need to insert but if insert2 selected then three rows after (b10).
I think its done by macros can any one assist me to do so?
Best Regards,
Rob
and each three rows contain vales in b10,b11,b12,SKU,PO,TPPO respectively
I want to know that how i can insert rows after specifice selection
e.g i have two values in drop down menu in b4. Insert1,Insert2
if insert1 selected from drop down then there is no need to insert but if insert2 selected then three rows after (b10).
I think its done by macros can any one assist me to do so?
Best Regards,
Rob
and each three rows contain vales in b10,b11,b12,SKU,PO,TPPO respectively
I have thousands of rows and most of the time I need to insert certain # of rows in between rows. Lets say between Rows 1114 and 1115 I need to insert 34 new rows. Instead of counting 34 rows down the lane then right click Insert, I would just like to select row 1115 and run a macro that will prompt a message box asking "Number of New Rows" and I will enter 34, click OK and that will insert new 34 rows right betwen rows 1114 and 1115. Can you pleaes help? Thanks in advance.
I have a spreadsheet with 20+ sheets and alot of formulas. There are a total of 210 ranges that I want to insert rows into. They are spread over the different sheets. Some of the sheets only have 1 range to insert rows into an others have up to 25 ranges to insert rows into. It takes about 8 minutes to insert 10 rows the first times. Then I try to insert 10 more rows and it takes about 20 minutes. When I try to insert the 5th set of 10 rows, it takes about 2 hours! The code that's being executed, inserted the rows in all 210 ranges and then it loops through the 210 ranges and copies the formulas down to the newly inserted rows. Before we do all of this, we turn the calculation off. Does anyone have any idea why it's taking so long to insert rows?
Hi,
I want to insert blanks rows above rows that have the number 1 inserted in column C.
I about 60,000 rows in all, doing it manually takes forever because I have to keep waiting for Excel to push the rows down every time I insert a new row.
Is there an efficient way to grab all the rows with a 1 in column C and insert rows in one swoop? If not, I will settle for any way other than manually.
Thank you.
I want to insert blanks rows above rows that have the number 1 inserted in column C.
I about 60,000 rows in all, doing it manually takes forever because I have to keep waiting for Excel to push the rows down every time I insert a new row.
Is there an efficient way to grab all the rows with a 1 in column C and insert rows in one swoop? If not, I will settle for any way other than manually.
Thank you.
Hi,
I would like to create a macro that inserts a row at the point of insertion eg row 25, at the same time insert a row at row 35 and also row 45. I would like to be able to use this macro to insert a row in a different place as well so not just at 25. So if the point of row insertion was row 28, insert a row at 38 and 48. As well I would like to be able to copy the formulas down from each of the three rows when the new rows are inserted into the spreadsheet. Is it possible to do this so the new rows can be inserted anywhere but still have the 2nd and third rows inserted 10 rows below. Using excel 2007 by the way.
Thanks for any assistance
I would like to create a macro that inserts a row at the point of insertion eg row 25, at the same time insert a row at row 35 and also row 45. I would like to be able to use this macro to insert a row in a different place as well so not just at 25. So if the point of row insertion was row 28, insert a row at 38 and 48. As well I would like to be able to copy the formulas down from each of the three rows when the new rows are inserted into the spreadsheet. Is it possible to do this so the new rows can be inserted anywhere but still have the 2nd and third rows inserted 10 rows below. Using excel 2007 by the way.
Thanks for any assistance
I am using the following to insert a blank row after every 10 rows but would like it to also put NEW in A1.
Code:
could this also be changed to insert blank row after 10 rows if there are 20 or more rows in the sheet and if there are less than 20 to divide the number of rows in half and insert the blank row?
Marty
Code:
Sub doit() Dim i As Long For i = Cells(Rows.Count, "A").End(xlUp).Row To 3 Step 10 Cells(i, "A").EntireRow.Insert Next i End Sub
could this also be changed to insert blank row after 10 rows if there are 20 or more rows in the sheet and if there are less than 20 to divide the number of rows in half and insert the blank row?
Marty
I have a spreadsheet with 20+ sheets and alot of formulas. There are a total of 210 ranges that I want to insert rows into. They are spread over the different sheets. Some of the sheets only have 1 range to insert rows into an others have up to 25 ranges to insert rows into. It is taking a very long time for the code to insert the rows into each range. So, I opened the worksheet, disabled macros and tried to insert the rows manually. It is taking a long time to insert the rows just into one section. It takes up to 5 seconds for each range. When I go into another spreadsheet I have with lots of formulas and insert rows there, it is quicker. Does anyone have any idea why it's taking so long to insert rows?
Hello all, I need a simple script to walk down a column of data (A) and insert 2 rows when the code finds a change in the values in column A (and then loop until blank value in column A). For example, if column A contains value 'Red' in rows 13, then 'Blue' in rows 410, the macro would insert 2 rows between rows 3 and 4. Thanks, David
I have 2 issues...they are probably easy but I am a relative novice...
First...Is there a way to expidite the insert rows feature? The way this spreadsheet is set up...I have to insert hundreds of rows and was wondering if there was a way to insert multiple rows at a time.
Second...I have the following in a bunch of cells...110...is there an easy way to change it to 1,2,3,4,5,6,7,8,9,10...?
Thanks...
First...Is there a way to expidite the insert rows feature? The way this spreadsheet is set up...I have to insert hundreds of rows and was wondering if there was a way to insert multiple rows at a time.
Second...I have the following in a bunch of cells...110...is there an easy way to change it to 1,2,3,4,5,6,7,8,9,10...?
Thanks...
Hi guys, i couldn't get an answer from another forum for this. i'm doing this macro that will insert rows for those I want to. Basically it's those rows after the subtotals.
My file is in the attachment & I would have a formula which reads "Insert Rows" so I can filter them, select visible cells & insert:
The VBA for the filtering & deleting:
Code:
The error that appeared:
Runtime error '1004':
Insert method of Range class failed
My file is in the attachment & I would have a formula which reads "Insert Rows" so I can filter them, select visible cells & insert:
The VBA for the filtering & deleting:
Code:
Selection.AutoFilter Field:=4, Criteria1:="Insert Row" Rows("4:10").Select Selection.SpecialCells(xlCellTypeVisible).Select Selection.Insert Shift:=xlDown
The error that appeared:
Runtime error '1004':
Insert method of Range class failed
Hello,
I have the below code for adding 6 rows after each date change in my spreadsheet, but it doesn't add rows after the last row of data. Can someone please help?
' *** Insert 6 blank rows after each change in Transmit Date *** '
'Declare Variables'
Dim r As Long
'Perform insert Rows through sheet'
For r = Range("A" & Rows.Count).End(xlUp).Row To 6 Step 1
If Cells(r, "A") Cells(r  1, "A") Then
Rows(r).Resize(6).Insert
End If
Next r
Thank you,
Liz
I have the below code for adding 6 rows after each date change in my spreadsheet, but it doesn't add rows after the last row of data. Can someone please help?
' *** Insert 6 blank rows after each change in Transmit Date *** '
'Declare Variables'
Dim r As Long
'Perform insert Rows through sheet'
For r = Range("A" & Rows.Count).End(xlUp).Row To 6 Step 1
If Cells(r, "A") Cells(r  1, "A") Then
Rows(r).Resize(6).Insert
End If
Next r
Thank you,
Liz
I need a simple macro to insert a row from row 6 onwards every 2 rows down as fas as row 2000. So it would be like me manually going to row 6, highlighting row 6, right clicking and hitting insert row, then going to row 8 and repeating...
Hello Forum,
Is there another way to write the code to add multiple rows instead of the recorded macro ? ;
Code:
so the code is written in one line to add 8 rows.
The "8" would be variable, so I might require elsewhere 10 rows or whatever the case may be.
Thanks.
Is there another way to write the code to add multiple rows instead of the recorded macro ? ;
Code:
Selection.EntireRow.Insert Selection.EntireRow.Insert Selection.EntireRow.Insert Selection.EntireRow.Insert Selection.EntireRow.Insert Selection.EntireRow.Insert Selection.EntireRow.Insert Selection.EntireRow.Insert
so the code is written in one line to add 8 rows.
The "8" would be variable, so I might require elsewhere 10 rows or whatever the case may be.
Thanks.
Please add something more so that I can be able to insert more than one rows with the option to insert these before or after any selected cell
Sub VBAddRows()
InputBox ("How many rows would you like to add?")
Selection.EntireRow.Insert
End Sub
Thanking you in anticipation.
Sub VBAddRows()
InputBox ("How many rows would you like to add?")
Selection.EntireRow.Insert
End Sub
Thanking you in anticipation.
Hi All,
I have an excel (2003) workbook that contains nearly 70 (no. keeps on changing) tabs. In my main tab named as "New" there is header in 1st 2 rows. I need a macro which copies these 2 rows and insert these rows in all other tabs.
PS: I want to insert (not paste) these 2 rows as the data in all other sheets start from row 1 onwards.
I hope I have cleared myself. Please revert if you have any questions for me.
Thanks a lot in advance for all your help.
I have an excel (2003) workbook that contains nearly 70 (no. keeps on changing) tabs. In my main tab named as "New" there is header in 1st 2 rows. I need a macro which copies these 2 rows and insert these rows in all other tabs.
PS: I want to insert (not paste) these 2 rows as the data in all other sheets start from row 1 onwards.
I hope I have cleared myself. Please revert if you have any questions for me.
Thanks a lot in advance for all your help.
Hello all,
I am trying to create a macro to find a group of rows, copy and them and insert them above the existing rows.
In column A, I need to find the cell containing the text "Insert new projects". Then I want it to copy all of the rows below that until it gets to a cell that says "Summary". Then I want it to insert/paste all of those rows (the ones between "Insert..." and "Summary") above the "Insert..." row exactly as they are.
This could include 10 rows or 30, just depending on the sheet it's run on, but it will always be the rows between (but not including) "Insert New Projects" and "Summary".
Any help would be very much appreciated.
Thanks,
RL
How do I insert rows which include predetermined text and equations (example sums and means). Is it possible to insert these rows in a multiple selection (example if I select row 3 and 15, the rows should insert underneath these two rows.
See my other post:http://www.mrexcel.com/forum/showthread.php?t=318619
See my other post:http://www.mrexcel.com/forum/showthread.php?t=318619
I have recorded a macro to insert six rows. I'd like to take this one step further and have the user enter the number of rows they want to insert. Right now the data is entered in A10:F33. Can someone help me with this? Many thanks!
Hi.
I'm new to macro and vba so please go easy on me.
I've a macro that I use to insert rows so I can copy down formula. My last two rows on the sheet contain footer rows so those need to stay. I just need to insert enough rows in between the first record row and just before the last two footer rows. Can't leave any blank rows.
I've a count formula on another sheet in the same workbook to count new records.
How do I go about referencing the result in the count field so the macro would insert the needed rows?
Would appreciate any help. Please don't go too technical on me. I'm an accountant.
This is how my macro looks right now. I would have to go in and manually put in the last row number  in this case "117".
'
Rows("4:117").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Rows("3:3").Select
Range(Selection, Selection.End(xlDown)).Select
Rows("3:117").Select
Selection.FillDown
End Sub
I'm new to macro and vba so please go easy on me.
I've a macro that I use to insert rows so I can copy down formula. My last two rows on the sheet contain footer rows so those need to stay. I just need to insert enough rows in between the first record row and just before the last two footer rows. Can't leave any blank rows.
I've a count formula on another sheet in the same workbook to count new records.
How do I go about referencing the result in the count field so the macro would insert the needed rows?
Would appreciate any help. Please don't go too technical on me. I'm an accountant.
This is how my macro looks right now. I would have to go in and manually put in the last row number  in this case "117".
'
Rows("4:117").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Rows("3:3").Select
Range(Selection, Selection.End(xlDown)).Select
Rows("3:117").Select
Selection.FillDown
End Sub
I would love to simplify this code. It is extremely long and I have to have 3 macros to complete the full need for what I am doing. It is very repetative. I am inserting 6 rows between the information that I have on my data sheet. However, I now have the need for a 7th row to be added and do not want to have to go back through and manually edit every number if I can help it.
Code:
Thank you so very much.
Code:
Sub Input_Lines_1() ' ' Rows("4:4").Select Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Rows("11:11").Select Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Rows("18:18").Select Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Rows("25:25").Select Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Rows("32:32").Select Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Rows("39:39").Select Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Rows("46:46").Select Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Rows("53:53").Select Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Rows("60:60").Select Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Rows("67:67").Select Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Rows("74:74").Select Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Rows("81:81").Select Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Rows("88:88").Select Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Rows("95:95").Select Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Rows("102:102").Select Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Rows("109:109").Select Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Rows("116:116").Select Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Rows("123:123").Select Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove End Sub
Thank you so very much.
Hi. I'm new on here but would really value any help you can give. I have a spreadsheet containing around 500 lines of unique data in rows. I now need to insert 20 rows of common data after each of the 500 rows. I have a macro that will insert 20 blank rows but need help to populate the blank rows with the 20 rows of data. The macro I have is:
Public Sub My_Insert()
Const bBLOCK As Byte = 20
Dim lRows As Long
Dim bLoop As Byte
For lRows = Range("A65536").End(xlUp).Row  1 To 1 Step 1
If WorksheetFunction.CountA(Rows(lRows)) 0 Then
For bLoop = 1 To bBLOCK
Rows(lRows + 1).EntireRow.Insert (xlShiftDown)
Next
End If
Next lRows
End Sub
Can anyone help. Thanks in advance.
Big C
Public Sub My_Insert()
Const bBLOCK As Byte = 20
Dim lRows As Long
Dim bLoop As Byte
For lRows = Range("A65536").End(xlUp).Row  1 To 1 Step 1
If WorksheetFunction.CountA(Rows(lRows)) 0 Then
For bLoop = 1 To bBLOCK
Rows(lRows + 1).EntireRow.Insert (xlShiftDown)
Next
End If
Next lRows
End Sub
Can anyone help. Thanks in advance.
Big C
1 1
2 3
3 2
4
5 6
Hi I have a spreadsheet with a total on the last row, I want a macro to insert 5 blank rows above the total row (listed at row 5 in the above example) at the bottom.
the trouble is of course as soon as you insert 5 rows, then next time I need to run this, the macro will need to detect which is the total row again before inserting another 5 rows.
any help/advice would be appreciated.
2 3
3 2
4
5 6
Hi I have a spreadsheet with a total on the last row, I want a macro to insert 5 blank rows above the total row (listed at row 5 in the above example) at the bottom.
the trouble is of course as soon as you insert 5 rows, then next time I need to run this, the macro will need to detect which is the total row again before inserting another 5 rows.
any help/advice would be appreciated.
hello all,
i need to write a macro that can insert cells a1:d1 for a specific number of times in the next empty cell.
example: (commas are the delimiters/column separators)
1, 2 , 3 , 4
a , b , c , d
e , f , g , h
i , j , k , l
m , n , o , p
the macro needs to find the next row that is empty (="") after MP
and then insert 1,2,3,4 for the next 5 rows or 7 rows or 10 rows(userdefined, maybe an inputbox?)
so a1:d1 has to come in after a5:d5, and populate the next ___ Rows.
Any ideas?
i need to write a macro that can insert cells a1:d1 for a specific number of times in the next empty cell.
example: (commas are the delimiters/column separators)
1, 2 , 3 , 4
a , b , c , d
e , f , g , h
i , j , k , l
m , n , o , p
the macro needs to find the next row that is empty (="") after MP
and then insert 1,2,3,4 for the next 5 rows or 7 rows or 10 rows(userdefined, maybe an inputbox?)
so a1:d1 has to come in after a5:d5, and populate the next ___ Rows.
Any ideas?
Hi,
I have been looking around on the forum and have been unable to find anything which fits the VBA requirements i am looking for... I am hoping someone can kindly help with a macro
I have a spreadsheet which in column G has a number value in each most cells.
I am trying to get a macro to loop through each cell in the column and insert the number of rows per the cell value minus one i.e if cell value is 10 it would insert 9 rows, if it was 5 it would insert 4 rows.
This would insert entire rows below the cell with the value
Not all cells in this column have a value so have entered End in the last cell. So it can be ended on the loop once End have been reached.
Alot of the cells have 1 or 0.5, these cells should not insert any rows.
I would be really greatful if anyone can help .
Thanks
Dan
I have been looking around on the forum and have been unable to find anything which fits the VBA requirements i am looking for... I am hoping someone can kindly help with a macro
I have a spreadsheet which in column G has a number value in each most cells.
I am trying to get a macro to loop through each cell in the column and insert the number of rows per the cell value minus one i.e if cell value is 10 it would insert 9 rows, if it was 5 it would insert 4 rows.
This would insert entire rows below the cell with the value
Not all cells in this column have a value so have entered End in the last cell. So it can be ended on the loop once End have been reached.
Alot of the cells have 1 or 0.5, these cells should not insert any rows.
I would be really greatful if anyone can help .
Thanks
Dan