Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks OsieMac,
It works well. Does just what I need. Regards, Keith "OssieMac" wrote: Hi again Keith, If not the entire row, if you have a specific column that will have the strickthrough then the following will do what you want. Just replace the "A" in Cells(r,"A") with whatever column you wish. Also in the previous post, delete the line Dim rngRow As Range. I initially was going to do it a different way and didn't remove the line. Sub DeleteStrikeThrough2() Dim r As Long For r = Sheets("Sheet1").UsedRange.Rows.Count To 1 Step -1 If Cells(r, "A").Font.Strikethrough = True Then Cells(r, "A").EntireRow.Delete End If Next r End Sub -- Regards, OssieMac "OssieMac" wrote: Hi Keith, Are the entire rows formatted to strikethrough? If so then the following code should do what you want. If not the entire row formatted to strikethrouth then will need to know the specific columns that are. Note: It is necessary to work backwards from the bottom when deleting rows. Sub DeleteStrikeThrough() Dim rngRow As Range Dim r As Long For r = Sheets("Sheet1").UsedRange.Rows.Count To 1 Step -1 If Rows(r).Font.Strikethrough = True Then Rows(r).Delete End If Next r End Sub -- Regards, OssieMac "Keith" wrote: I have a spreadsheet where some rows are formatted with strikethrough font. I need some code to delete the entire row where the font is set to strike through. Thanks, Keith |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how can I test in a formula if my font is strikethrough or not? | Excel Discussion (Misc queries) | |||
Count cells with strikethrough font? | Excel Worksheet Functions | |||
Strikethrough and Underline Font Macro | Excel Worksheet Functions | |||
Font strikethrough | Excel Programming | |||
Check font strikethrough | Excel Programming |