Excel Strikethrough Formula: How to Apply It
In this article
Excel cannot apply strikethrough as the direct result of a formula. A formula can only return a value, not a font style. The practical workaround is to use a formula in a helper column to flag which cells should be struck through, then apply strikethrough manually or with conditional formatting. If you want the strikethrough to appear automatically, you need a small VBA macro because conditional formatting does not offer a strikethrough option in the standard dialog.
What You'll Need
- Excel for Windows or Mac (the steps below are for the desktop app; Excel for the web has no strikethrough button in the Home tab and no VBA editor)
- A worksheet with the values you want to mark
- Optional: basic familiarity with the VBA editor if you want the strikethrough to apply automatically
Step-by-Step
- Decide what should trigger the strikethrough. Common examples: a status column contains "Done", a date in column B is in the past, or a quantity in column C equals zero. Write that condition down before you touch the sheet.
- Add a helper column. In the first empty column to the right of your data, put a header such as "Strike?". In the first data row, enter a formula that returns TRUE or FALSE. For example, if status is in column D and your first data row is row 2, use
=D2="Done". For a past-date check, use=B2<TODAY(). For a zero-quantity check, use=C2=0. - Copy the formula down. Drag the fill handle from the first cell to the last row of your data. Every row now shows TRUE or FALSE.
- Apply strikethrough manually to the flagged rows. Select the cells you want to format, then press Ctrl+5 on Windows or Cmd+5 on Mac. You can also use the Font group on the Home tab and click the strikethrough button (an S with a line through it). This is the fastest route when you only need to do it once.
- For automatic strikethrough, open the VBA editor. Press Alt+F11 on Windows or Fn+Option+F11 on Mac. In the Project pane, right-click your workbook name, choose Insert > Module, and paste a short macro. A simple pattern is a
Worksheet_Changeevent that checks the status column and setsFont.Strikethrough = Trueon the matching row. Keep the macro limited to the sheet you name so it does not affect other sheets. - Save as a macro-enabled workbook. Use File > Save As and choose Excel Macro-Enabled Workbook (*.xlsm). A normal .xlsx file will drop the macro on save.
- Test the trigger. Change a status to "Done" or enter a past date and confirm the row is struck through. Change it back and confirm the strikethrough is removed if your macro includes an Else branch that sets
Font.Strikethrough = False.
Menu labels and button positions can differ slightly by Excel version, device and region, but the Home tab Font group and the Ctrl+5 shortcut are consistent across current desktop versions.
Common Mistakes
- Expecting a formula to change formatting. Formulas return values only. A cell can contain
="Done"and still look completely normal until you format it. - Looking for strikethrough in conditional formatting. The standard conditional formatting dialog has font colour, bold, italic and underline, but no strikethrough checkbox. This is why the macro route exists.
- Forgetting to save as .xlsm. Macros are silently removed from .xlsx files. If the strikethrough stops working after reopening, this is usually why.
- Applying the macro to the wrong sheet. A
Worksheet_Changeevent only fires on the sheet whose code module contains it. Putting it in a standard module does nothing. - Using Ctrl+5 on a Mac with the wrong modifier. On Mac Excel the shortcut is Cmd+5, not Ctrl+5.
Tips
- Keep the helper column visible while you build the logic, then hide it once the macro or manual formatting is working.
- Use a named range or an Excel Table so the formula and macro ranges expand automatically when you add rows.
- If you only need the visual effect for printing, manual Ctrl+5 on the flagged rows is quicker than writing a macro.
- Combine the helper formula with an AutoFilter on the TRUE values to select and format all flagged rows in one go.
- Store the macro in your Personal Macro Workbook if you want the same behaviour in every workbook you open.
Troubleshooting
- The strikethrough does not appear after changing a value. Check that the macro is in the correct sheet module, that events are enabled (in the VBA editor Immediate window type
Application.EnableEvents = Trueand press Enter), and that the workbook is saved as .xlsm. - The macro runs but strikes the wrong row. Your row offset is probably off by one. If your header is in row 1 and data starts in row 2, the target row is
Target.Row, notTarget.Row - 1. - Ctrl+5 does nothing. Click inside the cell first so it is in edit-ready state, and make sure you are not in a cell that is locked on a protected sheet.
- The file opens with a security warning. Macro-enabled files from outside your organisation are blocked by default. Use the Trust Center to allow the file only if you created it or trust its source.
- Strikethrough disappears when you copy the cell. Copying formats requires Paste Special > Formats, or use the Format Painter. A plain paste carries the value but not the font style.
Frequently Asked Questions
Can a formula apply strikethrough directly?
No. Excel formulas return values, not cell formatting. You need manual formatting, a macro, or a helper column plus manual Ctrl+5.
Does conditional formatting support strikethrough?
Not in the standard conditional formatting dialog. Font colour, bold, italic and underline are available, but strikethrough is not. A VBA macro is the usual workaround.
What is the keyboard shortcut for strikethrough in Excel?
Ctrl+5 on Windows and Cmd+5 on Mac. The same shortcut toggles it off.
Why did my strikethrough stop working after saving?
The workbook was probably saved as .xlsx, which strips macros. Save as .xlsm and reopen the file.
Can I use strikethrough in Excel for the web?
Excel for the web does not include a strikethrough button in the Home tab and has no VBA editor, so automatic strikethrough is not available there. Use the desktop app for this.
Will strikethrough print?
Yes, strikethrough is a font format and prints like any other text formatting, provided the printer and font support it.