Give this a try:
Option Explicit
Sub InsertRows()
Dim MyVal As String
Dim MyCol As Range
Dim vFIND As Range
Dim vFIRST As Range
MyVal = Application.InputBox("String to insert rows above", Type:=2)
If MyVal = "False" Then Exit Sub
Set MyCol = Application.InputBox("Highlight a column to search", Type:=8)
On Error Resume Next
Set vFIND = MyCol.Find(MyVal, MyCol.Cells(1), xlValues, xlWhole, xlByRows, xlNext, False)
If Not vFIND Is Nothing Then
Set vFIRST = vFIND
Do
vFIND.EntireRow.Insert xlShiftDown
Set vFIND = MyCol.FindNext(vFIND.Offset(1))
Loop Until vFIND.Address = vFIRST.Address
Else
MsgBox "Search string not found in the specified column." & vbLf & "No rows added."
End If
Set MyCol = Nothing
Set vFirst = Nothing
Set vFind = Nothing
End Sub
Bookmarks