How to remove the line through text in Microsoft Excel
In Excel, the line through text lets you place a horizontal line across the text in a cell. This line cuts through the characters, indicating that the text is crossed out or irrelevant.
In this tutorial, we will learn how to remove the line through text in Microsoft Excel. To remove the line through text in Microsoft Excel we utilize multiple methods i.e. we can use the Format Cells dialog box or we can remove the line using the keyboard shortcut keys.
Method 1: Utilizing the Format Cells Dialog Box
The first method to remove the strike through or the line through the cell’s text is to use the format cell options. Let’s learn how to do this in the following steps.
Step 1 – Select the Cells
- Select the range of cells that contain the text with the line through.
Step 2 – Press the CTRL+1 Keys
- Press the CTRL+1 keys to open the “Format Cells” dialog box.
Step 3 – Navigate to the Font Tab
- Navigate to the Font tab.
Step 4 – Deselect the “Strikethrough” Option
- Deselect the “Strikethrough” option.
- Hit the OK button.
Method 2: Utilizing the Keyboard Keys
If you like to use the keyboard keys more than the mouse then follow the steps explained below.
Step 1 – Select the Cells
- Select the range of cells that contain the text with the line through.
Step 2 – Press the CTRL+5 Shortcut Keys
- Press the CTRL+5 shortcut keys on the keyboard.
- The line will be removed.
Method 3: Removing the Line Through Text Utilizing VBA
Step 1 – Press ALT+F11
- Press the ALT+F11 keys on the keyboard.
- This will open the Visual Basic editor.
Step 2 – Insert a New Module
- Insert a new module by performing a right-click on the sheet.
- Choose the Insert option and perform a click on the “Module” option.
Step 3 – Enter the VBA Code
- Enter the VBA code:
- Remember to modify the range and the name of the sheet if required.
Sub RemoveStrikethrough() Dim rng As Range Dim cell As Range ‘ Set the range to the desired worksheet or range of cells Set rng = Sheet1.Range(“A1:D6”) ‘ Update with your range ‘ Loop through each cell in the range For Each cell In rng ‘ Check if the cell has strikethrough formatting If cell.Font.Strikethrough = True Then ‘ Remove the strikethrough formatting cell.Font.Strikethrough = False End If Next cell End Sub |
Step 4 – Run the Code
- Run the code.