Share via

How to recognize strike-through text in Microsoft Excel?

Yoboua Jean-Jacques 0 Reputation points
2026-04-08T10:33:01.08+00:00

I would like to add a column in a table to recognize cells with strike-through text.
#Excel #strike-through text

Microsoft 365 and Office | Excel | For business | Windows
0 comments No comments

1 answer

Sort by: Most helpful
  1. Marcin Policht 85,250 Reputation points MVP Volunteer Moderator
    2026-04-08T12:03:37.78+00:00

    AFAIK, Excel formulas are not able to directly detect strikethrough formatting because it’s a visual style, not a cell value. To recognize it, you would need to use VBA (a custom function).

    Open the VBA editor with Alt + F11, insert a new module, and paste this code:

    Function HasStrikethrough(rng As Range) As Boolean
        HasStrikethrough = rng.Font.Strikethrough
    End Function
    

    Then return to Excel and use it like a normal formula in your new column:

    =HasStrikethrough(A1)
    

    It will return TRUE if the cell has strikethrough formatting and FALSE if it doesn’t.

    If your cells may contain mixed formatting (only part of the text struck through), use this version instead:

    Function HasPartialStrikethrough(rng As Range) As Boolean
        Dim i As Integer
        For i = 1 To Len(rng.Value)
            If rng.Characters(i, 1).Font.Strikethrough Then
                HasPartialStrikethrough = True
                Exit Function
            End If
        Next i
        HasPartialStrikethrough = False
    End Function
    

    Then call it with:

    =HasPartialStrikethrough(A1)
    

    If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.

    hth

    Marcin

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.