J
J.W. Aldridge
Want to insert blank row right before the first instance where a row
color is gray (color index 41).
Tried to work out the folliowing but no success.
Sub InsertRows()
Dim i As Long
i = 2
Do Until Trim(Cells(i, 1)) = ""
If cell.Interior.ColorIndex = 41 Then
Cells(i, 1).EntireRow.Insert
i = i + 2
Else
i = i + 1
End If
End Sub
color is gray (color index 41).
Tried to work out the folliowing but no success.
Sub InsertRows()
Dim i As Long
i = 2
Do Until Trim(Cells(i, 1)) = ""
If cell.Interior.ColorIndex = 41 Then
Cells(i, 1).EntireRow.Insert
i = i + 2
Else
i = i + 1
End If
End Sub