Thread
:
Macro to delete rows with font strikeouts
View Single Post
#
4
Posted to microsoft.public.excel.worksheet.functions
Don Guillett
external usenet poster
Posts: 10,124
Macro to delete rows with font strikeouts
I don't think findnext works with strikethrough so try
Sub DeleteStrikethrough()
For i = 1 to 25
If Cells(i, "a").Font.Strikethrough Then Rows(i).Delete
Next i
End Sub
--
Don Guillett
SalesAid Software
"Steve" wrote in message
...
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
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett