how can I test in a formula if my font is strikethrough or not?

P

PCLIVE

You could do this with VBA.

To test cell A1:

Sub StrikethoughTest()
If Range("A1").Font.Strikethrough = True _
Then
MsgBox ("Cell A1 is using Strikethrough.")
Else
MsgBox ("Cell A1 is NOT using Strikethrough.")
End If
End Sub


To test the active cell:

Sub StrikethoughTest()
If ActiveCell.Font.Strikethrough = True _
Then
MsgBox ("Cell " & ActiveCell.Address & " is using Strikethrough.")
Else
MsgBox ("Cell " & ActiveCell.Address & " is NOT using
Strikethrough.")
End If

End Sub

HTH,
Paul
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top