How to test a cell for the strikethrough effect?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

What formula, if any, would return, say, "true" or "false", for the presence
of the strikethrough effect on text in a given cell?
 
No formula can return formats.

Try this macro.

Make sure you have an empty column to the right of the selected cells.

Sub Strike_Through()
For Each cell In Selection
If cell.Font.Strikethrough = True Then
cell.Offset(0, 1).Value = "TRUE"
Else: cell.Offset(0, 1).Value = "FALSE"
End If
Next cell
End Sub


Gord Dibben MS Excel MVP
 
No formula can return formats.

It can be done with a named formula that uses GET.CELL but a UDF or macro is
easier to work with.

Biff
 
Back
Top