Code
Thank you very, very much, both!!!
I will try it!
DAn
-----Original Message-----
Hi
try the following macro. It tests column C and inserts a
row if
the value 'No' appears
Sub insert_rows()
Dim lastrow As Long
Dim row_index As Long
lastrow = ActiveSheet.Cells(Rows.count, "C").End(xlUp).row
For row_index = lastrow - 1 To 1 Step -1
If Cells(row_index+1, "C").Value ="No" Then
Cells(row_index + 1, "C").EntireRow.Insert
(xlShiftDown)
End If
Next
End Sub
--
Regards
Frank Kabel
Frankfurt, Germany
"Dan" schrieb im
Newsbeitrag
...
Hi:
I have 3 col:
1 1 OK
2 2 OK
3 4 NO
I would like please, a code that searches for "no" and
when is found highlight the row and insert another row
above??
Any help is appreciated.
Thsnk,
Dan
.
|