Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
How can I detect strikethrough formatting in a cell?
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? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 -- Gary''s Student - gsnu200812 "ww wondering" wrote: 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? |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
How can I detect strikethrough formatting in a cell?
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. ww wondering wrote: 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? -- Dave Peterson |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
How can I detect strikethrough formatting in a cell?
Thanks, it worked great!
"Gary''s Student" wrote: 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 -- Gary''s Student - gsnu200812 "ww wondering" wrote: 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? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Detect Cell Colour | Charts and Charting in Excel | |||
How to detect characters in cell? | Excel Discussion (Misc queries) | |||
How to test a cell for the strikethrough effect? | Excel Discussion (Misc queries) | |||
formatting (underline/bold/strikethrough) in comment boxes | Excel Discussion (Misc queries) | |||
Is there a function to detect changes in any given cell? | Excel Worksheet Functions |