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?
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!