rchansen2001
New Member
- Joined
- Nov 30, 2016
- Messages
- 28
I have the following macro which deletes rows based on the font format in column R. If the font is bold and italic then it deletes the entire row. The macro works but I am trying to modify it to include columns R:T, but I haven't figured out a way to do this. Any help is appreciated.
Code:
Sub DeleteStoppedJobs()
Dim wks As Worksheet
Dim iRow As Integer
iRow = 1
Set wks = Application.ActiveSheet
Do Until wks.Cells(iRow, 18).Value = ""
If wks.Cells(iRow, 18).Font.Bold = True And _
wks.Cells(iRow, 18).Font.Italic = True Then
wks.Rows(iRow).Delete
Else
iRow = iRow + 1
End If
Loop
End Sub