From: Danny on
Hi,

Is there a way that when you insert rows, the conditional formatting on the
adjacent rows does not copy into the inserted/new row?

Thanks,
From: ryguy7272 on
Here are tow ways of inserting a row when the text changes in Column A (I
don't know why you are inserting rows).

Sub InsertRow_At_Change()
Dim LastRow As Long
Dim x As Long
LastRow = Cells(Rows.Count, 1).End(xlUp).Row
Application.ScreenUpdating = False

For x = LastRow To 3 Step -1
If Cells(x, 1).Value <> Cells(x - 1, 1).Value Then
If Cells(x, 1).Value <> "" Then
If Cells(x - 1, 1).Value <> "" Then
Cells(x, 1).EntireRow.Insert Shift:=xlDown
End If
End If
End If
Next x

Application.ScreenUpdating = True
End Sub

Sub InsertAfterTextChange()
Do Until ActiveCell = Empty And ActiveCell.Offset(1) = Empty
If ActiveCell <> ActiveCell.Offset(1) And ActiveCell <> Empty And
ActiveCell.Offset(1) <> Empty Then
ActiveCell.Offset(1).EntireRow.Insert
ActiveCell.Offset(2).Select
Else
ActiveCell.Offset(1).Select
End If
Loop
End Sub

--
Ryan---
If this information was helpful, please indicate this by clicking ''Yes''.


"Danny" wrote:

> Hi,
>
> Is there a way that when you insert rows, the conditional formatting on the
> adjacent rows does not copy into the inserted/new row?
>
> Thanks,