How can I detect strikethrough formatting in a cell?

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?
 
G

Gary''s Student

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
 
D

Dave Peterson

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.
 

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