How to Draw a Line Through Text on Excell

This short tutorial explains different ways to add, use and remove strikethrough format in Excel desktop, Excel Online and Excel for Mac.

Excel is great for manipulating numbers, but it does not always make clear how to format text values the way you want. Strikethrough is a vivid example.

It is super easy to cross out text in Microsoft Word - you simply click the strikethrough button Strikethrough button on the ribbon. Naturally, you'd expect to see the same button on the Excel ribbon. But it's nowhere to be found. So, how do I strikethrough text in Excel? By using any of the six methods described in this tutorial :)

  • How to do strikethrough in Excel
    • Excel strikethrough shortcut
    • Apply strikethrough via format options
    • Add a strikethrough button to Quick Access Toolbar
    • Add a strikethrough button to Excel ribbon
    • Cross out text automatically with conditional formatting
    • Do strikethrough with VBA
  • How to strikethrough text in Excel Online
  • How to do strikethrough in Excel for Mac
  • How to remove strikethrough in Excel

How to strikethrough in Excel

To ensure that everyone is on the same page, let's define the term first. What does it mean to strikethrough in Excel? Simply, to put a line through a value in a cell. There are a handful of different ways to do this, and we are going to begin with the fastest one.

Excel strikethrough shortcut

Want to have the job done as quickly as possible? Press a hotkey or key combination.

Here's the keyboard shortcut to strikethrough in Excel: Ctrl + 5

The shortcut can be used on an entire cell, certain part of the cell contents, or a range of cells.

To apply the strikethrough format to a cell, select that cell, and press the shortcut:
Excel strikethrough shortcut

To draw a line through all values in a range, select the range:
Apply Excel strikethrough shortcut to a range.

To strikethrough non-adjacent cells, select multiple cells while holding the Ctrl key, and then press the strikethrough shortcut:
Apply the strikethrough shortcut non-adjacent cells.

To cross out part of the cell value, double-click the cell to enter the Edit mode, and select the text you want to strikethrough:
Apply the strikethrough shortcut to cross out specific words in a cell.

Apply strikethrough via cell format options

Another quick way to draw a line through a cell value in Excel is by using the Format Cells dialog. Here's how:

  1. Select one or more cells on which you want to apply the strikethrough format.
  2. Press Ctrl + 1 or right-click the selected cell(s) and choose Format Cells… from the context menu.
  3. In the Format Cells dialog box, go to the Font tab, and tick off the Strikethrough option under Effects.
  4. Click OK to save the change and close the dialog.

Add strikethrough via the Format Cells dialog.

Add a strikethrough button to Quick Access Toolbar

If you think that the above method requires too many steps, add the strikethrough button to the Quick Access Toolbar to always have it at your fingertips.

  1. Click the small arrow in the upper left corner of the Excel window, and then click More Commands…
    Add more commands to the Quick Access Toolbar.
  2. Under Choose commands from, select Commands Not in the Ribbon, then select Strikethrough in the list of commands, and click the Add button. This will add Strikethrough to the list of commands on the right pane, and you click OK:
    Adding a strikethrough button to the Quick Access Toolbar

Look at the upper left corner of your worksheet again, and you will find the new button there:
The strikethrough button is added to QAT.

Put a strikethrough button onto Excel ribbon

If your Quick Access Toolbar is reserved only for the most frequently used commands, which strikethrough is not, place it onto the ribbon instead. As with QAT, it's also one-time setup, performed in this way:

  1. Right-click anywhere on the ribbon and select Customize the Ribbon… from the pop-up menu:
    Customizing Excel ribbon
  2. Since new buttons can only be added to custom groups, let's create one. For this, select the target tab (Home in our case) and click the New Group button. Then, click Rename… to name the newly created group to your liking, say My Formats:
    Creating a new ribbon group
  3. With the new group selected, perform the already familiar steps: under Choose commands from, select Commands Not in the Ribbon, find Strikethrough in the list of commands, select it, and click Add:
    Adding a strikethrough button to a custom ribbon group
  4. Click OK to save the changes, and find the Strikethrough button on your Excel ribbon:
    The strikethrough button is added to the Excel ribbon.

You can now cross out text in Excel with a single button click! And it will also remind you the keyboard shortcut in case you forget it :)

Tip. By using Up and Down arrows in the Excel Options dialog box, you can move your custom group with the Strikethrough button to any position on the ribbon:
Move the Strikethrough button to any position on the ribbon.

How to strikethrough automatically with conditional formatting

In case you are planning to use a strikethrough to cross out the completed tasks or activities in a checklist or to-do list, you may want Excel to do it for you automatically as you enter some text in a related cell, for example "done":
Strikethrough is applied automatically based on another cell value.

The task can be easily accomplished with Excel Conditional Formatting:

  1. Select all the cells you want to cross out on condition (A2:A6 in this example).
  2. On the Home tab, in the Styles group, click Conditional Formatting > New Rule…
  3. In the New Formatting Rule dialog box, select Use a formula to determine which cells to format.
  4. In the Format values where this formula is true box, enter the formula that expresses the condition for your topmost cell:

    =$B2="Done"

  5. Click the Format…
    Creating a conditional formatting rule to strikethrough in Excel
  6. In the Format Cells dialog box, switch to the Font tab and select the Strikethrough Optionally, you can make some other formatting changes, e.g. set a light grey font color for crossed out entries:
    Select the Strikethrough effect.
  7. Click OK to close the Format Cells dialog box, then click OK one more time to close the New Formatting Rule window, and you are all set!
    Strikethrough is applied automatically based on a conditional formatting rule.

Instead of defining a task status with text, you can insert checkboxes, link them to some cells (which you can hide later) and base your conditional formatting rule on the value in the linked cells (TRUE is a checkbox is checked, FALSE if not checked).

As the result, Excel will check off the completed tasks automatically depending on whether the checkbox is selected or not.
Check off the completed tasks automatically based on the  checkbox status.

If you'd like to create something similar in your worksheets, the detailed steps can be found here: How to create a checklist with conditional formatting.

Add strikethrough with a macro

If you are not allergic to using VBA in your Excel worksheets, you can apply strikethrough on all selected cells with this line of code:

Sub ApplyStrikethrough()     Selection.Font.Strikethrough = True End Sub          

The step-by-step instructions on how to insert VBA code in Excel can be found here.

How to use strikethrough in Excel Online

In Excel Online, the strikethrough option is exactly where you'd expect to find it - next to the other formatting buttons on the Home tab, in the Font group:
Using strikethrough in Excel Online

However, there's a fly in the ointment - it's not possible to select non-adjacent cells or ranges in Excel Online. So, if you need to cross out multiple entries in different parts of your sheet, you will have to select each cell or a range of contiguous cells individually, and then click the strikethrough button.

The strikethrough shortcut (Ctrl + 5) works perfectly in Excel Online too and is often the fastest way to toggle the strikethrough formatting on and off.

How to strikethrough in Excel for Mac

A quick way to strikethrough text in Excel for Mac is by using this keyboard shortcut: ⌘ + SHIFT + X
The shortcut to strikethrough in Excel for Mac

It can also be done from the Format Cells dialog in the same way as in Excel for Windows:

  1. Select the cell(s) or part of a cell value you wish to cross out.
  2. Right-click the selection and chose Format Cells from the popup menu.
  3. In the Format Cells dialog box, switch to the Font tab and select the Strikethrough checkbox:
    Add strikethrough in Excel for Mac via the cell format options.

How to remove strikethrough in Excel

The correct way to remove strikethrough from a cell depends on how you've added it.

Remove strikethrough added manually

If you applied strikethrough via a shortcut or cell format, then press Ctrl + 5 again, and the formatting will be gone.

A longer way would be opening the Format Cells dialog (Ctrl + 1) and unchecking the Strikethrough box there:
Removing strikethrough in Excel

Remove strikethrough added with conditional formatting

If strikethrough is added by a conditional formatting rule, then you need to remove that rule to get rid of strikethrough.

To have it done, select all the cells from which you want to remove strikethrough, go to the Home tab > ­ Styles group, and click Conditional Formatting > Clear Rules > Clear Rules from Selected Cells:
Deleting a strikethrough conditional formatting rule

If some other conditional formatting rule(s) is applied to the same cells and you'd like to keep that rule, then click conditional Formatting > Manage Rules… and delete only the strikethrough rule.

For more information, please see How to delete conditional formatting rules in Excel.

That's how you can add and remove the strikethrough formatting in Excel. I thank you for reading and hope to see you on our blog next week!

You may also be interested in

How to Draw a Line Through Text on Excell

Source: https://www.ablebits.com/office-addins-blog/2018/04/18/how-to-strikethrough-in-excel/

0 Response to "How to Draw a Line Through Text on Excell"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel