Excel is excellent for working with numbers, but formatting text values in the way you want is not always obvious. The example of strikethrough is striking. In Microsoft Word, underlining text is quite simple. All you have to do is click the ribbon’s strikethrough button. The identical button should, of course, be present on the Excel ribbon. However, it is nowhere to be found. In this article, we will show you how to Draw a Line Through Text in Excel.
How to Draw a Line Through Text in Excel: 6 Easy Approaches
The character format known as “strikethrough” inserts a line through the cell or the selected text when it is applied to text or values in a cell. It is a format, so it is simple to remove. Double-clicking in a cell allows you to apply strikethrough by dragging the cursor over the text or values. In all the methods given below, you will learn how to draw a line through text in Excel using Keyboard Shortcut, utilizing Quick Access Toolbar, using Format Cells Box, applying Conditional Formatting, customizing Excel Ribbon, and applying VBA Code.
Let’s say, we have a sample dataset like the following.
1. Using a Keyboard Shortcut to Draw a Line Through Text in Excel
One or more keys are used as keyboard shortcuts to carry out menu functions or other typical tasks in an application or operating system. In general, keyboard shortcuts are less natural to use than point-and-click mouse actions. However, beginner users can use them in programs that they routinely use to navigate to places far more quickly than using the mouse. In the first step, we will use a keyboard shortcut to draw a line through text in Excel.
Step 1:
- Firstly, we will select the B8 cell.
Step 2:
- Now, press CTRL+5 to see the given line through text in cell D8.
2. Utilizing Quick Access Toolbar to Draw a Line Through Text
Shortcut keys to frequently used features, options, actions, or option groups are gathered in the Quick Access Toolbar. In Office programs, the toolbar is typically hidden beneath the ribbon, but you can opt to reveal it and move it to appear above the ribbon. In the second method, we will show you how to draw a line through text in Excel by utilizing the Quick Access Toolbar.
Step 1:
- Here, click on the Quick Access Toolbar.
- Then choose the More Commands… option.
Step 2:
- Here, the Excel Options window will open.
- Firstly, select the Commands Not in the Ribbon.
- Secondly, choose the Strikethrough tool.
- Thirdly, click on Add.
- And, you will see the Strikethrough command in the right corner which is marked by 4.
- Finally, click OK.
Step 3:
- Now, we will select the B6 cell to draw a line through the text.
- You will see that position 2 shows the Strikethrough tool, which has been added as a quick access tool.
- Besides, click on the Strikethrough command.
- Finally, you will see the line through text in cell B6.
3. Draw a Line Through Text from Format Cells Dialog Window
To change the formatting of a cell number without changing the actual number, we utilize Format Cells. To adjust the quantity, alignment, font style, border style, fill options, and protection, utilize the Format Cells dialog box. By using the right mouse button, we may access this option. When we right-click, a pop-up menu will emerge. From there, we may either click Format Cells or utilize the keyboard shortcut Ctrl+1. The third technique demonstrates how to use Excel’s Format Cells box to create a line through the text.
Step 1:
- Firstly, select any of the cells you want to draw a line through the text. We will select the B8 cell.
Step 2:
- Now, Right-click on the data set.
- Then, choose the Format Cells option.
Step 3:
- Here, the Format Cells dialog box will open.
- Firstly, select the Font option.
- Secondly, click on the Strikethrough tool.
- Thirdly, click OK.
Step 4:
- Finally, you will observe the line drawn through the text in cell B8.
Read More: Excel VBA Codes to Format Cell as Text
4. Applying Conditional Formatting to Draw a Line Through Text
If you have a worksheet that has tens of thousands of rows of data. Simply by looking at the raw data, patterns, and trends would be very difficult to spot. Conditional Formatting offers a further method of visualizing data and improving worksheet comprehension, much like charts and sparklines. You can automatically apply formatting to one or more cells based on the value of the cell, such as colors, icons, and data bars. This lesson will show you how to insert a line through text using Conditional Formatting.
Step 1:
- Here, we will select Column B.
- From the Home tab, you will select Conditional Formatting first.
- Then, choose the New Rule option.
Step 2:
- Here, the New Formatting Rule window will open.
- Firstly, select the “use a formula to determine which cells to format” option.
- Now, we will write our formula for such a type of cell where the task is done.
- Besides, select the Format option.
Step 3:
- In this part, choose the Strikethrough tool.
- And, click OK.
Step 4:
- Finally, you will see the line is drawn through the text in the B10 and B11 cells.
5. Customizing Excel Ribbon to Draw a Line Through Text
The row of tabs and icons known as the Microsoft Excel Ribbon is located at the top of the Excel window and enables you to rapidly locate, comprehend, and use commands for carrying out certain tasks. It has the appearance of a sophisticated toolbar. Tabs, groups, dialog launchers, and command buttons are the four basic parts of Excel’s ribbon. In this part, we’ll show you how to generate a line through text by customizing the Excel Ribbon.
Step 1:
- Here, right-click on the ribbon to open the Customize Ribbon window.
- Firstly, choose the New Group option.
- Secondly, select the Rename option.
- Thirdly, write your group name, we will write our custom group as My Group.
- Now, click OK.
Step 2:
- Firstly, select the Commands Not in the Ribbon option.
- Secondly, choose the Strikethrough tool.
- Thirdly, click the Add option to add Strikethrough to My Group.
- Finally, click OK.
Step 3:
- Now, select the B6 cell to draw a line through the text.
- And click on the My Group.
Step 4:
- Finally, you will notice a line is drawn through the text in the B6 cell.
6. Applying VBA Code to Draw a Line Through Text in Excel
VBA is a programming language that may be used for a variety of tasks, and different users of different types can use it for those tasks. Using the Alt + F11 keyboard shortcut, you can launch the VBA editor. In the last section, we will generate a VBA code that makes it very easy to draw a line through text in Excel.
Step 1:
- At first, we will open the Developer tab.
- Then, we will select the Visual Basic command.
Step 2:
- Here, the Visual Basic window will open.
- After that, from the Insert option, we will choose the new Module to write a VBA code.
Step 3:
- Now, paste the following VBA code into the Module.
- To run the program, click the “Run” button or press F5.
Sub Draw_Line_Through_Text()
'Selecting the text from the data set
Selection.Font.Strikethrough = True
End Sub
VBA Code Breakdown
- Firstly, we specify a name for the subject as Sub Draw_Line_Through_Text().
- Finally, we will select the cell in the data set to draw a line through the text using Font.Strikethrough = True.
Step 4:
- Here, you will see that cell B5 shows a line through the text.
Download Practice Workbook
Conclusion
In this article, I’ve covered 6 handy methods to draw a line through text in Excel. I sincerely hope you enjoyed and learned a lot from this article. If you have any questions, comments, or recommendations, kindly leave them in the comment section below.