FusionRed
01-19-2005, 02:31 PM
Hello Everyone:
I'm a newbie to VBA and having trouble with what I think should be a very easy macro. I'm trying to search a range for all yellow lines beginning from E11 to the end of the data in the spreadsheet. I want to add a blank line above and below the yellow line and both lines should have no fill color.
The following is some code I've tried (just a version of many tries):
Sub Insert_Blank_Rows()
' Insert_Blank_Rows before and after total line in Elabor Budgets
' Macro recorded 1/19/2005 by Pitney Bowes Inc.
Dim Cell As Range
Dim r As Range
Set r = Range("E11", ActiveCell.SpecialCells(xlCellTypeLastCell))
For Each Cell In r
Select Case Cell.Interior.ColorIndex
Case Cell.Interior.ColorIndex = 36
Selection.EntireRow.Insert
End Select
Next
End Sub
Can someone out there help me here????
Many thanks for your input and expertise.
FusionRed:devil:
I'm a newbie to VBA and having trouble with what I think should be a very easy macro. I'm trying to search a range for all yellow lines beginning from E11 to the end of the data in the spreadsheet. I want to add a blank line above and below the yellow line and both lines should have no fill color.
The following is some code I've tried (just a version of many tries):
Sub Insert_Blank_Rows()
' Insert_Blank_Rows before and after total line in Elabor Budgets
' Macro recorded 1/19/2005 by Pitney Bowes Inc.
Dim Cell As Range
Dim r As Range
Set r = Range("E11", ActiveCell.SpecialCells(xlCellTypeLastCell))
For Each Cell In r
Select Case Cell.Interior.ColorIndex
Case Cell.Interior.ColorIndex = 36
Selection.EntireRow.Insert
End Select
Next
End Sub
Can someone out there help me here????
Many thanks for your input and expertise.
FusionRed:devil: