Hello,
I have to make a macro that will delete all Rows which contains at least one Cell with StrikeThrough format.
Here is what I made so far :
It's not working yet as intended. Lets say the macro finds it has to delete a row when checking the Cell 5I, it will delete the row I which is good, but the next cell it will wheck will be 5J, whereas it should start checking the new row from the start (5A).
If you could help me, I would really appreciate.
Thanks
I have to make a macro that will delete all Rows which contains at least one Cell with StrikeThrough format.
Here is what I made so far :
Code:
Dim r As Range
Dim s As Worksheet
Dim c As Range
Dim i As Long
For Each s In ActiveWorkbook.Worksheets
s.Activate
Set r = s.UsedRange
For Each c In r.Cells
If c.Characters.Font.Strikethrough Then
Rows(c.Row).Select
Selection.Delete Shift:=xlUp
End If
Next c
Next s
It's not working yet as intended. Lets say the macro finds it has to delete a row when checking the Cell 5I, it will delete the row I which is good, but the next cell it will wheck will be 5J, whereas it should start checking the new row from the start (5A).
If you could help me, I would really appreciate.
Thanks
Last edited: