How can I detect strikethrough formatting in a cell?

  • Thread starter Thread starter ww wondering
  • Start date Start date
W

ww wondering

I'm using conditional formatting in one cell to detect if there is text in
another cell used for notes. When the note is no longer valid, I change the
text formatting to strikethrough so that I still have it for future
reference. I would like to cancel the conditional formatting in the other
cell based on the fact that striketrhough formatting is present. How can I
detect strikethrough formatting in a cell?
 
Assuming that cell A1 has the conditional formatting and cell B1 may have
strikethru font, try this tiny macro:

Sub wondering()
Dim A1 As Range, B1 As Range
Set A1 = Range("A1")
Set B1 = Range("B1")
If B1.Font.Strikethrough Then
A1.FormatConditions.Delete
End If
End Sub

adapt the ranges to your needs
 
I'm not quite sure what you're doing, but I think I'd add an indicator column.

I could use conditional formatting for both of these cells. (CF allows me to
use a strikethrough font.)

But I'm not sure how your existing conditional formatting works, so I don't have
any specific suggestion.
 
Back
Top