Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
FInd value and insert rows below
I have numbers in column A from 1,2,3,4,5,..etc.
I need a macro that will find a number for example "3" and insert 4 rows under the row that has the number "3" in column A. Any help will be appreciated. Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
FInd value and insert rows below
Right click sheet tab, view code and paste this in:-
Sub atomic() For x = Range("A65536").End(xlUp).Row To 1 Step -1 If Cells(x, 1).Value = 3 Then Cells(x + 1, 1).Select For y = 1 To 4 Selection.EntireRow.Insert Next End If Next End Sub Mike "vlad" wrote: I have numbers in column A from 1,2,3,4,5,..etc. I need a macro that will find a number for example "3" and insert 4 rows under the row that has the number "3" in column A. Any help will be appreciated. Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Array to find rows need to insert date criteria | Excel Discussion (Misc queries) | |||
Find & Replace and Find & Insert macro help needed | Excel Programming | |||
Want to find "2006 QTY" & insert 3 rows... | Excel Worksheet Functions | |||
find number & insert rows | Excel Programming | |||
Can I use "find / replace" to automatically "Insert Rows" in a do. | Excel Discussion (Misc queries) |