Macro to delete rows with font strikeouts
Hey, I don't know how your data is formatted, so if it's just one block of
data you can use this, if it's spread out, I can give you something for that
to, but this is the easiest way. LMK
Sub DeleteStrike()
Range("A1").Activate
Do Until ActiveCell.Value = ""
If ActiveCell.Font.Strikethrough = True Then
ActiveCell.EntireRow.Delete
Else: ActiveCell.Offset(1, 0).Activate
End If
Loop
End Sub
Change the starting Range to wherever your data starts.
"Steve" wrote:
I need to create a macro that will scan column A for any cells that contains
text with stikeouts and delete that entire row from the worksheet. My poor
example records manual keystokes but does not function.
Sub DeleteStikeouts()
'
Range("A1:A25").Select
With Application.FindFormat.Font
.Strikethrough = True
.Superscript = False
.Subscript = False
End With
Cells.Find(What:="", After:=ActiveCell, LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:=False _
, SearchFormat:=True).Activate
Rows("3:3").Select
Selection.Delete Shift:=xlUp
Range("A3").Select
Cells.FindNext(After:=ActiveCell).Activate
End Sub
Steve
|