I have the following macro looking for the word "No" in column I.
After finding the word "No" I would like to have the macro move BELOW the cell in which the word "No" resides, and THEN insert a blank row. This code below finds the word "No" and inserts a blank row ABOVE that row; I need to insert the row below. I can't seem to find the proper code for "move 1 cell below before inserting a blank row". Thanks in advance.
*********************
Sub Test1()
Dim c As Range, myCount As Long, i As Long
myCount = Application.CountIf(Range("I1:I20000"), "No")
With Range("I1:I20000")
i = 1
Set c = .Find("No", LookIn:=xlValues)
If Not c Is Nothing Then
Do
c.EntireRow.Insert
Set c = .FindNext(c)
i = i + 1
Loop While Not c Is Nothing And i <= myCount
End If
End With
End Sub
After finding the word "No" I would like to have the macro move BELOW the cell in which the word "No" resides, and THEN insert a blank row. This code below finds the word "No" and inserts a blank row ABOVE that row; I need to insert the row below. I can't seem to find the proper code for "move 1 cell below before inserting a blank row". Thanks in advance.
*********************
Sub Test1()
Dim c As Range, myCount As Long, i As Long
myCount = Application.CountIf(Range("I1:I20000"), "No")
With Range("I1:I20000")
i = 1
Set c = .Find("No", LookIn:=xlValues)
If Not c Is Nothing Then
Do
c.EntireRow.Insert
Set c = .FindNext(c)
i = i + 1
Loop While Not c Is Nothing And i <= myCount
End If
End With
End Sub