- To post as a guest, your comment is unpublished.· 10 months agoHi,Which Excel version are you using?
How to remove or delete all strikethrough texts or characters from cells in Excel?
This article is talking about removing all strikethrough texts or characters from multiple cells in Excel.
The below VBA code can help you remove all texts in cells which have been marked with strikethrough. Please do as follows.
1. In the worksheet contains the strikethrough texts you need to remove, press the Alt + F11 keys simultaneously to open the Microsoft Visual Basic for Applications window.
2. In the Microsoft Visual Basic for Applications window, please click Inset > Module. Then copy and paste below VBA code into the Code window.
VBA code: Remove all strikethrough texts from cells
Sub DelStrikethroughText() Dim xRg As Range, xCell As Range Dim xStr As String Dim I As Long On Error Resume Next Set xRg = Application.InputBox("Please select range：", "KuTools For Excel", Selection.Address, , , , , 8) If xRg Is Nothing Then Exit Sub Application.ScreenUpdating = Fase For Each xCell In xRg If IsNumeric(xCell.Value) And xCell.Font.Strikethrough Then xCell.Value = "" ElseIf Not IsNumeric(xCell.Value) Then For I = 1 To Len(xCell) With xCell.Characters(I, 1) If Not .Font.Strikethrough Then xStr = xStr & .Text End If End With Next xCell.Value = xStr xStr = "" End If Next Application.ScreenUpdating = True End Sub
3. Press the F5 key or click the Run button to run the code. In the popping up Kutools for Excel dialog box, please select the range contains the strikethrough texts you will remove, and then click the OK button. See screenshot:
Then all texts marked with a strikethrough are removed from cells immediately as below screenshot shown.
- How to remove text before or after a specific character in Excel?
- How to remove unwanted text from cell in Excel?
- How to remove numbers from cells which containing texts and numbers in Excel?
- How to remove only text from cells that containing numbers and texts in Excel?
You are guest
or post as a guest, but your post won't be published automatically.
- To post as a guest, your comment is unpublished.· 10 months agoHey guys, this worked for me but in some cases it somehow changes the text which is not formatted as strikethrough as strikethrough. Easy fix to go back and spotcheck the data in specific instances and un-strikethrough the range.
- To post as a guest, your comment is unpublished.· 2 years agoI use it for the whole column and my excel never come back....
- To post as a guest, your comment is unpublished.· 2 years agoHi san,
Would you provide the Excel version you are using?
The code works well in my case.
Sorry for the inconvenience.
- To post as a guest, your comment is unpublished.· 2 years agocan it be done through python, pandas ?
If yes can anybody help me out how to implement this ?
- To post as a guest, your comment is unpublished.· 2 years agoHi Girish,
The code hasn't been tested in python, pandas. Sorry can't help you with that. Thanks for commenting.
- To post as a guest, your comment is unpublished.· 3 years agoThis does not work. Excel goes into Not Responding.
- To post as a guest, your comment is unpublished.· 2 years agoIt works in small scale. I assume that the reason it goes into Not Responding is because the Macro takes forever when you have a lot of data to get through. This Macro is checking every single character for strike through.
I would recommend adding code that reformats the cell when it is done because I had several cells where the code removed the strikethrough text but the remaining text was still in strikethrough. I believe this is because the formatting of the full cell was strikethrough with the non strikethrough text being formatted differently, so just an FYI.
- To post as a guest, your comment is unpublished.· 3 years agoGood day,
Sorry for the inconvenience. Would you provide your Office version? Thanks for your comment.
- To post as a guest, your comment is unpublished.· 3 years agoSame here.
I am using Office 365 ProPlus