I used Earl's advice and your advice as well, but for some reason when I run
the macro it is deleting rows that have black text. It should only delete
entire rows if the cell is blank or grey text in colomn "J". I assigned the
macro to a command button on Sheet8. If I run the macro while I am looking
at "Engineering" it works great for "Engineering" but screws the rest of the
worksheets up. I have looked at this for hours and can't figure it out, any
idea what could be happening? I listed the present code below:
Sub NEW_COMPILE_SCHEDULES()
Dim sh As Worksheet
Dim LastRow As Long
For Each sh In Worksheets(Array("Engineering", "Graph Pro", "Metal Fab",
"Alum Ext", _
"Custom Fab", "Electrical", "Ch Ltrs", "Foam Fab", "Metal
Paint", _
"Thermo", "Tri Graphics", "Deco Faces", "Tri-Face", "LED",
"Crating", _
"Service", "Delivery"))
LastRow = sh.Cells(65536, 1).End(xlUp).Row
For i = LastRow To 5 Step -1
If sh.Cells(i, 10).Font.ColorIndex = 15 Then
sh.Cells(i, 1).ENTIREROW.Delete
ElseIf Cells(i, 10) = "" Then
sh.Cells(i, 1).ENTIREROW.Delete
End If
Next i
Next sh
End Sub
> Ryan
>
[quoted text clipped - 49 lines]
> >>
> >> End Sub
Earl Kiosterud - 10 Oct 2007 00:27 GMT
Ryan,
You left off one qualifier (sh.) in the ElseIf line.

Signature
Regards from Virginia Beach,
Earl Kiosterud
www.smokeylake.com
Note: Top-posting has been the norm here.
Some folks prefer bottom-posting.
But if you bottom-post to a reply that's
already top-posted, the thread gets messy.
When in Rome...
-----------------------------------------------------------------------
>I used Earl's advice and your advice as well, but for some reason when I run
> the macro it is deleting rows that have black text. It should only delete
[quoted text clipped - 81 lines]
>> >>
>> >> End Sub
RyanH - 10 Oct 2007 20:55 GMT
BAM! PERFECT! This is my first attempt at writing a macro from scratch. I
appreciate your help.
> Ryan,
>
[quoted text clipped - 85 lines]
> >> >>
> >> >> End Sub